events in outlook vba

P

PeterQ

hello everybody (and especially Ken),

I want to create an event handler for every time the folder list
menu-item on the view menu is pressed, either to show the folder list or
hide the folder list. I want to add some code every time this happens.

anyone (Ken??) ??

greetings,

Peter


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
K

Ken Slovak - [MVP - Outlook]

A menu item is a CommandBarButton. If you declare a CommandBarButton object
WithEvents at the module level of the ThisOutlookSession class module and
then instantiate the button in Application_Startup you can then handle its
Click event. You would get the button by accessing the
ActiveExplorer.CommandBars collection, the "Menu Bar" CommandBar from there
and then the "View" CommandBarPopup and in that control's Controls
collection finding the Folder List button.
 
Top