Post by AlexHello Cindy,
Post by Cindy M -WordMVP-Post by Hurry WoodRecently, I make some code for adding a menu entry into menu
command bar of MS WORD9 with VC++6, then the problem was out, no
Click event fired from WORD application! But the same method that I
used to add a command bar button to my custom command bar before is
ok. Does custom menu entry added of MS WORD9 never fire click event?
Without knowing more about how you designed your tool, it's
difficult to say. But the most common reason for the problem you
describe happens if you do not assign a unique string to each
command bar control's TAG property.
Are there other uses for the Tag property?
If not, it seems to me that assigning a UUID to it would be safest.
It depends what you want to do.
In some cases, I need to display a toolbar based on some conditions stored
in document variables. Because many documents from the same template can
have different conditions, I use a Document_Change event to detect the
change, read the variable, and show/hide certain menus based on their tag
value. In such a case, to make my life easier, all menu related to the same
condition have the same tag. I guess you could add a unique identifier, and
use InStr to get the common string in the tag string value...
--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
***@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org