Table of contents
Collapse the table of content
Expand the table of content

Application.WindowBeforeDoubleClick Event (PowerPoint)

office 365 dev account|Last Updated: 6/12/2017
1 Contributor

Occurs when you double-click the items in the views listed in the following table.


expression. WindowBeforeDoubleClick( Sel, Cancel )

expression A variable that represents an Application object.


NameRequired/OptionalData TypeDescription
SelRequiredSelectionThe selection below the mouse pointer when the double-click occurs.
CancelRequiredBooleanFalse when the event occurs. If the event procedure sets this argument to True, the default double-click action isn't performed when the procedure is finished.


For information about using events with the Application object, seeHow to: Use Events with the Application Object.

Normal or slide viewShape
Slide sorter viewSlide
Notes page viewSlide image

The default double-click action occurs after this event unless the Cancel argument is set to True.


In slide sorter view, the default double-click event for any slide is to change to slide view. In this example, if the active presentation is displayed in slide sorter view, the default action is preempted by the WindowBeforeDoubleClick event. The event procedure changes the view to normal view and then cancels the change to slide view by setting the Cancel argument to True.

Private Sub App_WindowBeforeDoubleClick (ByVal Sel As Selection, ByVal Cancel As Boolean)

    With Application.ActiveWindow

        If .ViewType = ppViewSlideSorter Then

           .ViewType = ppViewNormal

            Cancel = True

        End If

    End With

End Sub

See also


Application Object

© 2018 Microsoft