Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / April 2005

Tip: Looking for answers? Try searching our database.

CommandBarButton Click event doesnt be fired?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Hurry Wood - 15 Apr 2005 09:49 GMT
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
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?
Jean-Guy Marcil - 15 Apr 2005 14:09 GMT
Hurry Wood was telling us:
Hurry Wood nous racontait que :

> 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 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?

No, you can add your own menus/buttons where ever you want and the events
behind them should fire.

There is something going on in your code... But this group is dedicated to
VBA, not C++...
Maybe someone that experienced with C++ will be along, but I would not hold
my breath!
You could try in one of the C++ groups.

Signature

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

Alex - 15 Apr 2005 23:45 GMT
> There is something going on in your code... But this group is dedicated to
> VBA, not C++...
> Maybe someone that experienced with C++ will be along, but I would not hold
> my breath!
> You could try in one of the C++ groups.

Which "this" group?

Hurry Wood crossposted (and you replied) to:
   microsoft.public.office.developer.com.add_ins
   microsoft.public.office.developer.office.sdks
   microsoft.public.officedev
   microsoft.public.vc.atl
   microsoft.public.word.vba.addins

4 of these groups are not dedicated to VBA and, in fact, one of them is dedicated to C++...

Best wishes,
Alex.
Signature

Address email to user "response" at domain "alexoren" with suffix "com"

Jean-Guy Marcil - 18 Apr 2005 04:26 GMT
Alex was telling us:
Alex nous racontait que :

>> There is something going on in your code... But this group is
>> dedicated to VBA, not C++...
[quoted text clipped - 3 lines]
>
> Which "this" group?

I'll let you guess! ;-)

> Hurry Wood crossposted (and you replied) to:
>     microsoft.public.office.developer.com.add_ins
[quoted text clipped - 5 lines]
> 4 of these groups are not dedicated to VBA and, in fact, one of them
> is dedicated to C++...

In fact (as you had correctly surmised), I had not noticed the
cross-posting... but my comments are still valid. Was it necessary to
crosspost to a vba group since there is a very slim chance that someone in
the VBA group will be able to help him? But hey, you never know!

Signature

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

Cindy M  -WordMVP- - 19 Apr 2005 16:42 GMT
Hi Hurry,

> 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
> 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.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :-)
Alex - 20 Apr 2005 15:56 GMT
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

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.