Commadn button wont fire event in Contacts form

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top