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 :-)