FitToPage Method

Applies To

DocumentWindow object.

Description

Adjusts the size of the specified document window to accommodate the information that's currently displayed.

Syntax

expression.FitToPage

expression Required. An expression that returns a DocumentWindow object.

See Also

FitToPage property, Zoom property, ZoomToFit property.

Example

This example sets the view in the active window to slide view, sets the zoom to 25 percent, and adjusts the size of the window to fit the slide displayed there.

With Application.ActiveWindow
    .ViewType = ppViewSlide
    .View.Zoom = 25
    .FitToPage
End With