ActiveView Property

Read-only. Returns an instance of the Window object, corresponding to the active document view.

Applies to: Document object

Syntax

[[Set] windowRet =] object.ActiveView

The ActiveView property syntax has these parts:

Part Description
object Required. An expression returning a Document object.
windowRet Optional. A Window type variable.

Remarks

If there is no active document view, the ActiveView property returns a Window object, corresponding to the most recent active page of the document (the ActivePage property). It doesn't necessarily return the last active document view, rather any window, corresponding to the most recent active page of the document. The active document view type (the Type property ) is document view (cdDOCVIEW).

Example

This example contains a document-level script. It demonstrates how to control the active document view by using the ActiveView property of the document.

' Maximize window
thisDoc.ActiveView.Maximize()
' Display message
MsgBox( "Active View is Maximized!" )
' Minimize active window
thisDoc.ActiveView.Minimize()
MsgBox( "Active View is Minimized!" )
' Restore the original view of the window
thisDoc.ActiveView.Restore()
MsgBox( "Active View is Restored!" )

 

See Also

ActivePage property, Type property, Window object