Occurs when you double-click the items in the views listed in the following table.
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.
Private Sub application_WindowBeforeDoubleClick(ByVal Sel As Selection, ByVal Cancel As Boolean)
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.
Sel The selection below the mouse pointer when the double-click occurs.
Cancel 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.
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, ByVal Cancel As Boolean)
With Application.ActiveWindow
If .ViewType = ppViewSlideSorter Then
.ViewType = ppViewNormal
Cancel = True
End If
End With
End Sub