Window.Width property (Publisher)

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

Syntax

expression.Width

expression A variable that represents a Window object.

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 
 .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.