ViewMode Property (Web Object Model)
ViewMode property as it applies to the PageWindowEx object.
FpPageViewMode
FpPageViewMode can be one of these FpPageViewMode constants. |
fpPageViewNoFrames |
fpPageViewNormal |
fpPageViewNoWindow |
fpPageViewPreview |
fpPageViewDefault |
fpPageViewHtml |
expression.ViewMode
*expression * Required. An expression that returns a PageWindowEx object.
ViewMode property as it applies to the WebWindowEx object.
FpWebViewMode
FpWebViewMode can be one of these FpWebViewMode constants. |
fpWebViewAllFiles |
fpWebViewBrokenLinks |
fpWebViewFolders |
fpWebViewLinks |
fpWebViewPage |
fpWebViewSiteSummary |
fpWebViewStructure |
fpWebViewTodo |
expression.ViewMode
*expression * Required. An expression that returns a WebWindowEx object.
ViewMode property as it applies to the FPHTMLDocument and IFPDocument objects.
Returns a Long that represents the view mode of the document. Read-only.
expression.ViewMode(ViewMode)
*expression * Required. An expression that returns an FPHTMLDocument or IFPDocument object.
ViewMode Required Long. The new viewing mode.
Example
As it applies to the PageWindowEx object.
The following example changes the view mode of the active window to the value fpPageViewNormal (Design view) if it is not already in the default view mode.
Sub ChangeViewMode()
'Changes the view mode of the active window
Dim fpApp As FrontPage.Application
Dim objPage As PageWindowEx
Set fpApp = FrontPage.Application
Set objPage = fpApp.ActivePageWindow
If objPage.ViewMode <> fpPageViewDefault Then
objPage.ViewMode = fpPageViewNormal
MsgBox "The current page window has been restored " & _
"to normal view."
End If
End Sub
As it applies to the WebWindowEx object.
The following example changes the view mode of the active Web site window to fpWebBrokenLinks (Broken Links view) if the window is not already in the view.
Sub ChangeViewMode()
'Changes the view mode of the active window
Dim fpApp As FrontPage.Application
Dim objWebWindow As WebWindowEx
Set fpApp = FrontPage.Application
Set objWebWindow = fpApp.ActiveWebWindow
If objWebWindow.ViewMode <> fpWebViewBrokenLinks Then
objWebWindow.ViewMode = fpWebViewBrokenLinks
MsgBox "The current page window has been restored " & _
"to Broken Links view."
End If
End Sub
As it applies to the FPHTMLDocument object.
The following example displays the view mode of the active document.
Sub DisplayViewMode()
'Changes the view mode of the active window
Dim fpApp As FrontPage.Application
Dim objDoc As FPHTMLDocument
Set fpApp = FrontPage.Application
Set objDoc = fpApp.ActiveDocument
Select Case objDoc.ViewMode
Case 1
MsgBox "The document is in Normal mode."
Case 2
MsgBox "The document is in HTML mode"
Case 8
MsgBox "The document is in Preview mode"
End Select
End Sub
Applies to | FPHTMLDocument Object | IFPDocument Object