View.Type (Word)

Returns or sets the view type. Possible return values are wdConflictView, wdMasterView - A master view, wdNormalView - A normal view, wdOutlineView - An outline view, wdPrintPreview - A print preview view, wdPrintView - A print view, wdReadingView - A reading view, wdWebView - A Web view.

The Type property returns wdMasterView for all documents where the current view is an outline or a master document. The current view will never return wdOutlineView unless explicitly set first in code. To check whether the current document is an outline, use the Type property and the Subdocuments collection's Count property. If the Type property returns either wdOutlineView or wdMasterView and the Count property returns zero, the document is an outline. For example:


Sub VerifyOutlineView() 
 With ActiveWindow.View 
 If .Type = wdOutlineView Or wdMasterView Then 
 If ActiveDocument.Subdocuments.Count = 0 Then 
 . 
 . 
 . 
 End If 
 End If 
 End With 
End Sub