how to connect my add-ins button with built in menu

K

Kim, KiSong

Hi ,

My Outlook add-ins has 2 buttons. (using ATL)
I'm trying to find one of my button clicked then pop up Options page
(Outlook's menu Tools->Options)

Does any body know about that ?
 
K

Ken Slovak - [MVP - Outlook]

The event that fires when Tools, Options is clicked is
NameSpace.OptionsPagesAdd. When that event fires you can reference your OCX
for that property page.

To force that to happen you have to iterate the Controls collection of the
"Menu Bar" CommandBar, find Tools, and iterate the Controls of that
CommandBarPopup until you hit Options and then call .Execute on that
CommandBarButton.

Once you have the ID values for those controls you can code them into your
code directly.
 
Top