Syntax

expression.Open(OpenKind)

expression Required. A variable that represents an HTMLProjectItem 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 first HTML project item in the active workbook in text view.

Visual Basic for Applications
ActiveWorkbook.HTMLProject.HTMLProjectItems _ Item(1).Open (msoHTMLProjectOpenTextView)