Word add-in command button event doesn't fire for second document

W

wincentric

Hello. I'm writing a C++ COM Word add-in based on the Microsof
COMADDIN sample download. The problem is the button's event is onl
called for the first document. If I open a second document, the even
never fires. I've scoured the 'Net and can't find any remedy. I hav
Office 2003. Anyone else ever have this?

TIA
-bret
 
C

Cindy M.

Hi Wincentric,
I'm writing a C++ COM Word add-in based on the Microsoft
COMADDIN sample download. The problem is the button's event is only
called for the first document. If I open a second document, the event
never fires. I've scoured the 'Net and can't find any remedy. I have
Office 2003.
Most recent (since Word 2000) documentation about Add-ins (admittedly,
I've never read any for C++) mentions you have to set the TAG property
of each button with a unique string value ("unique" meaning it will
identifiable for your application). No value assigned to the TAG
property is usually the cause of the behavior you report.

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

brettg

Thank you Cindy. I don't think this is the issue. I had tried setting a tag
on the button. I think it must have something to do with each Document that
is opened. I was able to find one other post on another forum (but there was
no solution given). The guy had the same problem and even tried binding to
the OnNewDocument/OnOpenDocument events and setting the event sink for each.
Still didn't work. Can anyone at Microsoft give the solution for this?
 
C

Cindy M.

Hi =?Utf-8?B?YnJldHRn?=,
Thank you Cindy. I don't think this is the issue. I had tried setting a tag
on the button. I think it must have something to do with each Document that
is opened. I was able to find one other post on another forum (but there was
no solution given). The guy had the same problem and even tried binding to
the OnNewDocument/OnOpenDocument events and setting the event sink for each.
Still didn't work. Can anyone at Microsoft give the solution for this?
Microsoft only posts answers in this newsgroup if you're an MSDN subscriber and
have logged in via the MSDN support website. Otherwise, opening a paid support
incident is your only option for getting an answer from Microsoft.

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top