Share via


Window Object

Multiple objects
Window

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

Using the Window Object

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

Properties | Application Property | Caption Property | Height Property | Hwnd Property | Left Property | Parent Property | Top Property | Visible Property | Width Property | WindowState Property

Methods | Activate Method | Move Method | Resize Method

Parent Objects | Application Object | Document Object

Child Objects