PageFit Property

Applies To

Zoom object.

Description

Returns or sets the view magnification of a window so that either the entire page is visible or the entire width of the page is visible. Can be one of the following WdPageFit constants: wdPageFitBestFit, wdPageFitFullPage, or wdPageFitNone. Read/write Long.

Remarks

The wdPageFitFullPage constant has no effect if the document isn't in page layout view.

When the PageFit property is set to wdPageFitBestFit, the zoom percentage is automatically recalculated every time the document window size is changed. Setting this property to wdPageFitNone keeps the zoom percentage from being recalculated whenever this happens.

See Also

Percentage property.

Example

This example changes the magnification percentage of the window for Letter.doc so that the entire width of the text is visible.

With Windows("Letter.doc").View
    .Type = wdNormalView
    .Zoom.PageFit = wdPageFitBestFit
End With
This example switches the active window to page layout view and changes the magnification so that the entire page is visible.

With ActiveWindow.View
    .Type = wdPageView
    .Zoom.PageFit = wdPageFitFullPage
End With