Commadn button wont fire event in Contacts form

  • Thread starter Thread starter Bjørn Eliasen
  • Start date Start date
B

Bjørn Eliasen

Hi,

I am developing a com add-in for Outlook 2003 in vb 6.0.

The add-in uses the new_inspector event to track, when a user opens a new
window. In the case of a new mail item I instantiate a new class and the
following works Ok:

Private cbar As Office.CommandBar
Private WithEvents menu As Office.CommandBarButton
....
....
Public Sub Start(ByVal cMailItem As Outlook.MailItem, inspector As
Outlook.inspector)

Set cbar = inspector.CommandBars.ActiveMenuBar
Set menu = cbar.Controls.Add(msoControlButton, , , , True)
menu.Caption = "Click me"
menu.Visible = True

When I do exectly the same for a contact item, the menu is displayed but the
menu_click event doesn't fire

Any suggestions will be much appriciated.
Bjørn
 
Back
Top