Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming Add-Ins / September 2004

Tip: Looking for answers? Try searching our database.

Commadn button wont fire event in Contacts form

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bj?rn Eliasen - 22 Sep 2004 12:03 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.