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
Dave Kane [MVP - Outlook] - 29 Sep 2004 18:27 GMT
Try setting the Tag property for the commandbarbutton when you create it.
Office/Outlook probably can't tell where to raise the click event to your
code. This article probably applies
http://support.microsoft.com/default.aspx?scid=kb;EN-US;826931
"Bjørn Eliasen" wrote:
> Hi,
>
[quoted text clipped - 21 lines]
> Any suggestions will be much appriciated.
> Bjørn