Window Object (Publisher)

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

Use the ActiveWindow property to return a Window object. The following example maximizes the active window.

Sub MaximizeWindow 
 ActiveWindow.WindowState = pbWindowStateMaximize 
End Sub

Use the Caption property to return the file and application names of the active window. The following example displays a message with the file name and Microsoft Publisher application name.

Sub ShowFileApNames 
 MsgBox Windows(1).Caption 
End Sub
Show:
© 2014 Microsoft