Share via


View Object

View Object
This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.


Aa168352.parchild(en-us,office.10).gifView
Aa168352.space(en-us,office.10).gifAa168352.parchild(en-us,office.10).gif

Contains the view attributes (show all, field shading, table gridlines, and so on) for a window or pane.

Using the View Object

Use the View property to return the View object. The following example sets view options for the active window.

  With ActiveDocument.ActiveWindow.View
    .ShowAll = True
    .TableGridlines = True
    .WrapToWindow = False
End With

Remarks

Use the Type property to change the view. The following example switches the active window to normal view.

  ActiveDocument.ActiveWindow.View.Type = wdNormalView

Use the Percentage property to change the size of the text on-screen. The following example enlarges the on-screen text to 120 percent.

  ActiveDocument.ActiveWindow.View.Zoom.Percentage = 120

Use the SeekView property to view comments, endnotes, footnotes, or the document header or footer. The following example displays the current footer in the active window in print layout view.

  With ActiveDocument.ActiveWindow.View
    .Type = wdPrintView
    .SeekView = wdSeekCurrentPageFooter
End With