MDI Word Problem

K

kylix2001

Hi all :

I have developed a add-in for Office (Word,Excel and PowerPoint) with Visual
Studio 2005 with C# language (extensibility project).

My add-in start correctly when Office application start, adding a tool bar
and a command bar button.

If a user opens a word document and and the button presses, all is OK. But,
if then the user, opens another word document (without closing first document)
, the button not respond.

The event assigned to the button is not launched. For some reason Word unregister
the event assigned to the button???

This problem is only in Word, Excel and PowerPoint is OK.


Somebody has some idea or suggestion


Thanks to all.

PD: Excuse me inglish from dictionary. :)
 
C

Cindy M.

Hi Kylix2001,
I have developed a add-in for Office (Word,Excel and PowerPoint) with Visual
Studio 2005 with C# language (extensibility project).

My add-in start correctly when Office application start, adding a tool bar
and a command bar button.

If a user opens a word document and and the button presses, all is OK. But,
if then the user, opens another word document (without closing first document)
, the button not respond.

The event assigned to the button is not launched. For some reason Word unregister
the event assigned to the button???

This problem is only in Word, Excel and PowerPoint is OK.
You need to be sure to declare the button as a class member (to make sure it isn't
garbage collected). And you need to assign a value to the TAG property (this is what
Word uses to track the button for multiple windows).

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