WindowActivate Event

Occurs when the application window or any document window is activated.

Private Subapplication**_WindowActivate(ByValPresAs Presentation, ByValWnAs DocumentWindow)**

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

*Pres    * The presentation displayed in the activated window.

*Wn    * The activated document window.

Example

This example opens every activated presentation in slide sorter view.

Private Sub App_WindowActivate _         (ByVal Pres As Presentation, ByVal Wn As DocumentWindow)
    Wn.ViewType = ppViewSlideSorter
End Sub

Applies to | Application Object

See Also | WindowDeactivate Event