This documentation is archived and is not being maintained.

Document.ActiveView Property

Office 2007
Returns a View object representing the view attributes for the specified document. Read-only.

Syntax

expression.ActiveView

expression   A variable that represents a Document object.

Return Value
View

Example

The following example sets the active publication zoom to fill the screen.

Visual Basic for Applications
Sub SetActiveZoom()
    Dim viewTemp As View

    ActiveDocument.Pages(1).Shapes.AddShape 1, 10, 10, 50, 50
    Set viewTemp = ActiveDocument.ActiveView
    ActiveDocument.Pages(1).Shapes(1).Select
    viewTemp.Zoom = pbZoomFitSelection
End Sub



Show: