Returns or sets the ViewMode object in Microsoft FrontPage. Read/write Long.
Note The write capability of the view mode is limited. For example, you can't set the view mode of an existing page window to fpPageViewNoWindow. However, you can open a page window with the FpPageViewMode argument set to fpPageViewNoWindow. Once you've opened a page in a windowless environment, you cannot set the FpPageViewMode argument to a different constant.
.Syntax 1: Returns or sets a PageWindow object.
Syntax 2: Returns or sets a WebWindow object.
Syntax 1
expression.ViewMode As FpPageViewMode
expression Required. An expression that returns or sets a ViewMode object for a PageWindow object.
FpPageViewMode A string that contains the view mode. It can be set to view modes such as Normal, HTML, or Preview, which correspond to tab names in Page view.
The following table describes the enumerated constants for the ViewMode property.
Enumerated Constant | Value | Description |
---|---|---|
FpPageViewDefault | 0 | The Normal tab in Page view for HTML pages and HTML tab in Page view for style sheets or .asp pages if they contain HTML that FrontPage cannot safely parse. |
fpPageViewNormal | 1 | The Normal tab in Page view |
fpPageViewHtml | 2 | The HTML tab in Page view |
fpPageViewNoFrames | 4 | The NoFrames tab in Page view (this tab only appears when frames are present) |
fpPageViewPreview | 8 | The Preview tab in Page view |
fpPageViewNoWindow | 128 or &H80 | This setting prevents a window from opening for the page |
Note Opening a page with fpPageViewNoWindow causes a condition where you can't access Window elements. For example, if you open a page without a window and try to access it using code such as PageWindow.Document.ParentWindow
, the resulting code would return nothing instead of returning an FPHTMLWindow2 object. For more information on opening pages without Windows, see Coding in a Windowless Environment.
Syntax 2
expression.ViewMode As FpWebViewMode
expression Required. An expression that returns or sets a ViewMode object for a WebWindow object.
FpWebViewMode A string that contains the view mode. It can be set to Normal, HTML, or Preview, which correspond to tab names in Page view.
The following table describes the constants enumerated for the ViewMode property.
Enumerated Constant | Value | Description |
---|---|---|
fpWebViewLinks | 0 | Hyperlinks view |
fpWebViewFolders | 1 | Folders view |
fpWebViewStructure | 2 | Navigation view |
fpWebViewPage | 3 | Page view |
fpWebViewAllFiles | 4 | All files as viewed in the Reports view |
fpWebViewTodo | 5 | To Do list in Tasks view |
fpWebViewBrokenLinks | 6 | Broken Links list in Reports view |
fpWebViewSiteSummary | 7 | Site Summary list in Reports view |