Application.WindowActivate Event (PowerPoint)
Occurs when the application window or any document window is activated.
Syntax
expression .WindowActivate(Pres, Wn)
expression A variable that represents an Application object.
Parameters
Name |
Required/Optional |
Data Type |
Description |
---|---|---|---|
Pres |
Required |
Presentation |
The presentation displayed in the activated window. |
Wn |
Required |
DocumentWindow |
The activated document window. |
Remarks
For information about using events with the Application object, see How to: Use Events with the Application Object.
If your Visual Studio solution includes the Microsoft.Office.Interop.PowerPoint reference, this event maps to the following types:
Microsoft.Office.Interop.PowerPoint.EApplication_WindowActivateEventHandler (the WindowActivate delegate.)
Microsoft.Office.Interop.PowerPoint.EApplication_Event.WindowActivate (the WindowActivate event.)
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