Window.Activate method (Word)

Activates the specified window.

Note

If you are working with a document embedded within another document, this event will not occur.

Syntax

expression.Activate

expression Required. A variable that represents a Window object.

Example

This example activates the next window in the Windows collection.

Sub NextWindow() 
 'Two or more documents must be open for this statement to execute. 
 ActiveDocument.ActiveWindow.Next.Activate 
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.