View 对象(Word)View object (Word)

包含窗口或窗格的视图属性(如全部显示、域底纹和网格线)。Contains the view attributes (such as show all, field shading, and table gridlines) for a window or pane.

说明Remarks

使用 View 属性返回的 视图 对象。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

使用 类型 若要更改视图的属性。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. 下面的示例将放大屏幕文本到 120%。The following example enlarges the on-screen text to 120 percent.

ActiveDocument.ActiveWindow.View.Zoom.Percentage = 120

使用 SeekView 若要查看批注、 尾注、 脚注,或文档的页眉或页脚的属性。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

方法Methods

名称Name
CollapseAllHeadingsCollapseAllHeadings
CollapseOutlineCollapseOutline
ExpandAllHeadingsExpandAllHeadings
ExpandOutlineExpandOutline
ForceLowresUpdateForceLowresUpdate
ForceOffscreenUpdateForceOffscreenUpdate
NextHeaderFooterNextHeaderFooter
PreviousHeaderFooterPreviousHeaderFooter
ShowAllHeadingsShowAllHeadings
ShowHeadingShowHeading

属性Properties

名称Name
ApplicationApplication
ColumnWidthColumnWidth
ConflictModeConflictMode
CreatorCreator
DisplayBackgroundsDisplayBackgrounds
DisplayPageBoundariesDisplayPageBoundaries
DraftDraft
FieldShadingFieldShading
FullScreenFullScreen
放大镜Magnifier
MailMergeDataViewMailMergeDataView
MarkupModeMarkupMode
PageColorPageColor
PageMovementTypePageMovementType
PanningPanning
ParentParent
ReadingLayoutReadingLayout
ReadingLayoutActualViewReadingLayoutActualView
ReadingLayoutTruncateMarginsReadingLayoutTruncateMargins
RevisionsBalloonShowConnectingLinesRevisionsBalloonShowConnectingLines
RevisionsBalloonSideRevisionsBalloonSide
RevisionsBalloonWidthRevisionsBalloonWidth
RevisionsBalloonWidthTypeRevisionsBalloonWidthType
RevisionsFilterRevisionsFilter
SeekViewSeekView
ShadeEditableRangesShadeEditableRanges
ShowAllShowAll
ShowBookmarksShowBookmarks
ShowCommentsShowComments
ShowCropMarksShowCropMarks
ShowDrawingsShowDrawings
ShowFieldCodesShowFieldCodes
ShowFirstLineOnlyShowFirstLineOnly
ShowFormatShowFormat
ShowFormatChangesShowFormatChanges
ShowHiddenTextShowHiddenText
ShowHighlightShowHighlight
ShowHyphensShowHyphens
ShowInkAnnotationsShowInkAnnotations
ShowInsertionsAndDeletionsShowInsertionsAndDeletions
ShowMainTextLayerShowMainTextLayer
ShowMarkupAreaHighlightShowMarkupAreaHighlight
ShowObjectAnchorsShowObjectAnchors
ShowOptionalBreaksShowOptionalBreaks
ShowOtherAuthorsShowOtherAuthors
ShowParagraphsShowParagraphs
ShowPicturePlaceHoldersShowPicturePlaceHolders
ShowRevisionsAndCommentsShowRevisionsAndComments
ShowSpacesShowSpaces
ShowTabsShowTabs
ShowTextBoundariesShowTextBoundaries
ShowXMLMarkupShowXMLMarkup
SplitSpecialSplitSpecial
TableGridlinesTableGridlines
类型Type
WrapToWindowWrapToWindow
ZoomZoom

另请参阅See also

Word 对象模型参考Word Object Model Reference

支持和反馈Support and feedback

有关于 Office VBA 或本文档的疑问或反馈?Have questions or feedback about Office VBA or this documentation? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.