Window.Height property (Publisher)

Returns or sets a Long that represents the height (in points) of the window. Read/write.

Syntax

expression.Height

expression A variable that represents a Window object.

Remarks

The valid range for the Height property depends on the size of the application workspace and the position of the object within the workspace.

For centered objects on non-banner page sizes, the Height property may be 0.0 to 50.0 inches. For centered objects on banner page sizes, the Height property may be 0.0 to 241.0 inches.

Example

This example sets the height and width of the active window if the window is neither maximized nor minimized.

Sub SetWindowHeight() 
 With ActiveWindow 
 If .WindowState <> pbWindowStateNormal Then 
 .WindowState = pbWindowStateNormal 
 .Height = InchesToPoints(5) 
 .Width = InchesToPoints(5) 
 End If 
 End With 
End Sub

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.