M
mark-dale
Please can anyone tell me how to reset the OnAction property in
PowerPoint 2003?
I'm hooking into the menus to call my own macros using the OnAction
property eg
Dim myFileMenu As Object
Dim myButton As CommandBarButton
Set myFileMenu = Application.CommandBars("File")
Set menuItem = myFileMenu.FindControl(Type:=msoControlButton,
id:=CommandBars("File").controls("Open...").id)
menuItem.OnAction = "DocumentOpen"
and when I want to remove my hooks I simply set the OnAction to an
empty string.
menuItem.OnAction = ""
This works fine for all versions of all Office apps EXCEPT PowerPoint
2003 which gives an error when the line is encountered.
PLEASE... can anyone tell me how to do it?
Thanks
Mark
PowerPoint 2003?
I'm hooking into the menus to call my own macros using the OnAction
property eg
Dim myFileMenu As Object
Dim myButton As CommandBarButton
Set myFileMenu = Application.CommandBars("File")
Set menuItem = myFileMenu.FindControl(Type:=msoControlButton,
id:=CommandBars("File").controls("Open...").id)
menuItem.OnAction = "DocumentOpen"
and when I want to remove my hooks I simply set the OnAction to an
empty string.
menuItem.OnAction = ""
This works fine for all versions of all Office apps EXCEPT PowerPoint
2003 which gives an error when the line is encountered.
PLEASE... can anyone tell me how to do it?
Thanks
Mark