events in outlook vba

  • Thread starter Thread starter PeterQ
  • Start date Start date
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
 
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.
 
Back
Top