CommandBarControl click event not firing in word

S

steve

I have written a com addin for word,excel,powerpoint and outlook using c#.
It adds a custom menu with threemenu items.
For excel,powerpoint and outlook it all works fine and the click event is
fired for each menu item.

However, for word I get the following two scenarios

1) If I create the button styles as msoButtonCaption I do not get the events
fired at all for any menu item
2) If I create the button styles as msoButtonIconAndCaption I only get the
event fired for the first menu item.

In response to some other posts I have ensured that the Tag property has
been set a unique value.

Any suggestions?
 
P

Paul Qualls

Steve,

Are you setting the ".Tag" property of your button? It doesn't have to be
anything special, but in order for events to consistently fire when it is
added to multiple commandbars around the office suite, I have found that you
need to set it.

Paul
 
K

Ken Slovak - [MVP - Outlook]

In addition to what Paul mentions, the Tag property should be unique to each
object that's assigned a Tag to make things work correctly.
 

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