WindowActivate Event

Microsoft PowerPoint Visual Basic

Show All

WindowActivate Event

       

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

Private Sub application_WindowActivate(ByVal Pres As Presentation, ByVal Wn As 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