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 / August 2006

Tip: Looking for answers? Try searching our database.

problem in handling more than one button in a COM Addin for Word

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
hamidC++ - 07 Aug 2006 12:42 GMT
I have developed a COM addin in visual C++ for Office Word which creates a
toolbar whit two buttons on it, but I don't know how to handle more than one
button events. The problem is that my addin runs the same code for the click
of any of the two buttons.
The DISPID dispidMember (first input) of my class's Invoke function is 1
independent of which button has been clicked.
Cindy M. - 07 Aug 2006 15:01 GMT
Hi =?Utf-8?B?aGFtaWRDKys=?=,

> I have developed a COM addin in visual C++ for Office Word which creates a
> toolbar whit two buttons on it, but I don't know how to handle more than one
> button events. The problem is that my addin runs the same code for the click
> of any of the two buttons.
> The DISPID dispidMember (first input) of my class's Invoke function is 1
> independent of which button has been clicked.

Note that this group is specific for VBA questions. The best place to ask
questions about COM Addins is

http://msdn.microsoft.com/newsgroups/default.aspx?dg=microsoft.public.office.de
veloper.com.add_ins&lang=en&cr=US

Your event code can query the TAG or CAPTION property of the button (the button
object should be available through the event args) and branch accordingly, I
should imagine?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
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 :-)
 
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.