|
Home
|
VBA Section |
General Section |
Downloads |
Licensing |
Privacy Policy
|
|
How to add items to the slide show menu The right-click menu displayed during the slideshow is a part of the command bar collection so it's easily possible to place items right there. . Sub PlaceItemOnSSMenu() Dim oCommandSSCtl As CommandBarPopup ' Get the slideshow right-click popup reference
Set oCommandSSCtl = CommandBars.FindControl(ID:=30330)
If Not oCommandSSCtl Is Nothing Then
With oCommandSSCtl
' Place a menu item on it.
With .Controls.Add(msoControlButton, , 1, 4, True)
.Tag = "SampleRightClickMenuItem"
.Caption = "This is a custom button..."
.OnAction = "RunThisMacro"
End With
End With
End If
End Sub Sub RunThisMacro() Msgbox "You clicked the menu item." End Sub |
Copyright © 1999-2009 Shyam Pillai. All rights reserved.
|