Muokkaa

Jaa


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

See also

Application Object

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.