Application.WindowBeforeDoubleClick event (PowerPoint)

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

Syntax

expression. WindowBeforeDoubleClick( _Sel_, _Cancel_ )

expression A variable that represents an Application object.

Parameters

Name Required/Optional Data type Description
Sel Required Selection The selection below the mouse pointer when the double-click occurs.
Cancel Required Boolean False 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.

Remarks

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

View Item
Normal or slide view Shape
Slide sorter view Slide
Notes page view Slide image

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

Example

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, Cancel As Boolean)

    With Application.ActiveWindow

        If .ViewType = ppViewSlideSorter Then

           .ViewType = ppViewNormal

            Cancel = True

        End If

    End With

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.