Hello Cindy,
"Cindy M -WordMVP-" <C.Meister-C@hispeed.ch> wrote in message news:VA.0000ab79.00a51b55@speedy...
> > Recently, 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
[quoted text clipped - 5 lines]
> 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.

Signature
Address email to user "response" at domain "alexoren" with suffix "com"
Jean-Guy Marcil - 20 Apr 2005 19:12 GMT
Alex was telling us:
Alex nous racontait que :
> Hello Cindy,
>
[quoted text clipped - 11 lines]
> 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...

Signature
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org