WindowActivate Event

See Also         Example         Applies To

Occurs when any document window is activated.

Syntax

Private Sub object_WindowActivate(ByVal Doc As Word.Document, ByVal Wn As Word.Window)

object   An object of type Application declared with events in a class module. For more information about using events with the Application object or the Document object, see Using Events with the Application Object or Using Events with the Document Object.

Doc   Used only with the Application object. The document displayed in the activated window.

Wn   The window that's being activated.