OpenFile Method

      Applies To

Opens a file as though the user invoked the File Menu’s Open File command.

Syntax

Method OpenFile(ViewKind As String, FileName As String) As Window

This syntax has these parts:

Part Description
ViewKind Required GUID string specifying the kind of view to open. The following, at a minimum, are supported: vsext_vk_Code, vsext_vk_Designer, and vsext_vk_Primary.
FileName Required String providing the full pathname.

Remarks

If the file is part of a project, it is opened as a ProjectItem object. If the file is not part of a project, then it is opened in the miscellaneous files project.