Edit

Share via


Zooms object (Word)

A collection of Zoom objects that represents the magnification options for each view (such as outline, normal, or print layout).

Remarks

Use the Zooms property to return the Zooms collection. The following example sets the zoom percentage for the active window to 100 percent in Normal view.

ActiveDocument.ActiveWindow.ActivePane _ 
 .Zooms(wdNormalView).Percentage = 100

The Add method isn't available for the Zooms collection. The Zooms collection includes a single Zoom object for each of the various view types (such as outline, normal, or page layout). You cannot enumerate the Zooms collection by using a For Each loop.

Use Zooms (index), where index identifies the view type, to return a single Zoom object. The view type specified by index can be one of the following WdViewType constants: wdMasterView, wdNormalView, wdOutlineView, wdPrintPreview, wdPrintView, or wdWebView. The following example sets the magnification for the active window so that an entire page is visible.

ActiveDocument.ActiveWindow.ActivePane _ 
 .Zooms(wdPrintView).PageFit = wdPageFitFullPage

You can also use the Zoom property of the View object to return a single Zoom object. The following example sets the zoom percentage for the active window to 110 percent.

ActiveDocument.ActiveWindow.View.Zoom.Percentage = 110

See also

Word Object Model Reference

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.