Menu event called 3 times

D

David Thielen

Hi;

I have an event handler that brings up a dialog box. I have set that event
handler as the CommandMenu.Click event for an item on my main menu, an item
on my toolbar, and an item on the "Text" RMB menu.

When any of those is clicked, it is brought up 3 times. I have done a
seperate new Delegate(...) for the main menu and toolbar. And for the RMB I
did not even do a Click += assignment - yet it still comes up.

All three places are different CommandBarControl/CommandBarButton objects.
But all 3 do have the same tag. Is it the same tag? And in that case, should
I do different tags for each or make use of this?
 
P

Peter Huang [MSFT]

Hi

I think you may try to set the three items of same tag, but assign the
click even on just one button to see if that works.
Also can you show some code about how your Create the three buttons and add
event handler to show your problem, so that we can figure out your scenario
more concrete.


Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
D

David Thielen

Hello;

I just tried it. If my toolbar menu has a different tag - it is called once.
If it has the same tag name - it is called twice.

Is this by design or a bug or what?
 
P

Peter Huang [MSFT]

Hi

Based on my experience, this is by design.
Word menuitem needs the assistant of Tag to fire the event.
Because something there may be two word document windows opened but only
one winword.exe instance.
Here is a link for your reference.
http://groups-beta.google.com/group/microsoft.public.office.developer.com.ad
d_ins/browse_thread/thread/674deb030a90e16/e31ccc1c6cba18ab?q=%22v-phuang%22
+tag+office&rnum=10&hl=en#e31ccc1c6cba18ab


Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 

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