Syntax

expression.Open(OpenKind)

expression Required. A variable that represents an object.

Parameters

Name Required/Optional Data Type Description
OpenKind Optional MsoHTMLProjectOpen The view in which the specified project or project item is opened.

Remarks

The default view is determined by whether or not the Microsoft Script Editor is open when the Open method is executed. If the Script Editor is not open, the Open method starts the Script Editor in source view. If the Script Editor is already open, the Open method activates the Script Editor and displays the script in the current view.

Example

This example opens the HTML project in the active workbook in source view.

Visual Basic for Applications
AppActiveWorkbook.HTMLProject.Open _ (msoHTMLProjectOpenSourceView)