Upravit

Sdílet prostřednictvím


Application.WindowSize event (Word)

Occurs when the application window is resized or moved.

Syntax

expression.WindowSize (Doc, Wn)

expression A variable that represents an 'Application' object that has been declared with events in a class module. For information about using events with the Application object, see Using events with the Application object.

Parameters

Name Required/Optional Data type Description
Doc Required Document The document in the window being sized.
Wn Required Window The window being sized.

Example

This example displays a message every time the Microsoft Word application window is moved or resized. This example assumes that you have declared an application variable called "WordApp" in your general declarations and have set the variable equal to the Word Application object.

Private Sub WordApp_WindowSize(ByVal Doc As Document, _ 
 ByVal Wn As Window) 
 MsgBox "You have just resized or moved your window." 
End Sub

See also

Application Object

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.