Window object (Publisher)

Represents a window. Many publication characteristics, such as scroll bars and rulers, are actually properties of the window.

Remarks

Use the ActiveWindow property of the Application object to return a Window object.

Use the Caption property to return the file and application names of the active window.

Example

The following example maximizes the active window.

Sub MaximizeWindow 
 ActiveWindow.WindowState = pbWindowStateMaximize 
End Sub

The following example displays a message with the file name and Microsoft Publisher application name.

Sub ShowFileApNames 
 MsgBox Windows(1).Caption 
End Sub

Methods

Properties

See also

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.