J
jschmidt
I have created a COM Addin that creates a command bar button. When mor
than one instance of Outlook is created the event continues to wor
with the first instance of Outlook, but does not work with the secon
instance (nothing happens when the button is clicked). Is there a wa
to re-hook the event when a new Outlook window is opened? I used th
following code to add my menu item and declare the variable for th
Command Button:
With mobjCmdBarCtrl.Controls
Set btnHolidayRequest = .Add(Type:=msoControlButton
Temporary:=False, Before:=1)
End With
The declaration for btnHolidayRequest is:
Public WithEvents btnHolidayRequest As CommandBarButto
than one instance of Outlook is created the event continues to wor
with the first instance of Outlook, but does not work with the secon
instance (nothing happens when the button is clicked). Is there a wa
to re-hook the event when a new Outlook window is opened? I used th
following code to add my menu item and declare the variable for th
Command Button:
With mobjCmdBarCtrl.Controls
Set btnHolidayRequest = .Add(Type:=msoControlButton
Temporary:=False, Before:=1)
End With
The declaration for btnHolidayRequest is:
Public WithEvents btnHolidayRequest As CommandBarButto