Are you creating a unique Tag property for each button you create? That's a
requirement for the button not to fire multiple times when it's clicked.
WordMail has its own set of rules. For one thing any changes you make using
Temporary := True are not respected. You have to explicitly delete your UI
(a good practice even without WordMail). When you add UI to Word you are
modifying the CustomizationContext, which usually is normal.dot but can be
set to other locations. If CustomizationContext.Saved == False then either
Word will save the changes to the context location or prompt on exit to
save. So after each change to any UI element you have to force
CustomizationContext.Saved to True to prevent that. That's after you delete
the UI elements.
The Tag behavior isn't only with WordMail, it follows with any UI elements
you add: a unique Tag per element.
--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm
"Steffen Grellmann" wrote in message
news

Hi Ken,
thank you for replying. I'm working with an Inspector wrapper class
now. Nevertheless with this technique the handler
AddHandler oInspClass.myMail.Close, AddressOf myMail_Close
is already fired once independently from the number of Inspectors has
been opened so far.
But this technique is not working for the button click - I'm still
receiving multiple clicks when the handler is defined like this:
AddHandler oInspClass.MyButton.Click, AddressOf ButtonClick
BTW, it's a Button on the "E-Mail"-commandbar which is IMO part of the
Wordmail editor. The button is added Temporary = TRUE, but is
persisting in Word afterwards.
Do you have an example that demonstrates the adding of a handler for a
button on a Wordeditor commandbar considerating multiple Insepctors?
Kind regards,
Steffen