Group:  General ยป microsoft.public.officedev
Thread: messages from 2 addin instances

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

messages from 2 addin instances
Tamir 17.09.2006 11:09:01
Hi,
I wrote an addin which inserts some buttons into ms-word. When a button is
pressed the addin posts a message to an automation project which does some
things with the document.
The problem comes into place when two documents are opened in two different
windows; in this case the automation project will receive posts ONLY from the
first opened document.
Moreover, even if I close the first window the remaining window is ignored -
i.e. no messages are being posted from its addin.
I examined my automation project with Spy++ and as it seems there are no
messages from the second window.

Does any body knows why it happens or what to do ???


Best regards.

Re: messages from 2 addin instances
Cindy M. <C.Meister-C[ at ]hispeed.ch> 18.09.2006 08:04:32
Hi =?Utf-8?B?VGFtaXI=?=,

You need to assign a unique value to the .TAG property of each button, otherwise
the Add-in can't identify the buttons when multiple windows are open. This is
documented in most of the articles on creating Add-ins that you find on MSDN.

[Quoted Text]
> I wrote an addin which inserts some buttons into ms-word. When a button is
> pressed the addin posts a message to an automation project which does some
> things with the document.
> The problem comes into place when two documents are opened in two different
> windows; in this case the automation project will receive posts ONLY from the
> first opened document.
> Moreover, even if I close the first window the remaining window is ignored -
> i.e. no messages are being posted from its addin.
> I examined my automation project with Spy++ and as it seems there are no
> messages from the second window.
>
> Does any body knows why it happens or what to do ???
>

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

Re: messages from 2 addin instances
Tamir 18.09.2006 08:27:02
Hi Cindy,
do you know of a link to such an article, I would like to read some more
about it.
By he way, the second instance of the addin doesent even stop at breakpoints
on debug - does it say something.

Best regards.

"Cindy M." wrote:

[Quoted Text]
> Hi =?Utf-8?B?VGFtaXI=?=,
>
> You need to assign a unique value to the .TAG property of each button, otherwise
> the Add-in can't identify the buttons when multiple windows are open. This is
> documented in most of the articles on creating Add-ins that you find on MSDN.
>
> > I wrote an addin which inserts some buttons into ms-word. When a button is
> > pressed the addin posts a message to an automation project which does some
> > things with the document.
> > The problem comes into place when two documents are opened in two different
> > windows; in this case the automation project will receive posts ONLY from the
> > first opened document.
> > Moreover, even if I close the first window the remaining window is ignored -
> > i.e. no messages are being posted from its addin.
> > I examined my automation project with Spy++ and as it seems there are no
> > messages from the second window.
> >
> > Does any body knows why it happens or what to do ???
> >
>
> 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 :-)
>
>
Re: messages from 2 addin instances
Tamir 18.09.2006 10:53:02
Cindy,
Im setting the TAG property of each button to a specific string but the
debugger doesent even step into this line. It seems like a unique value is
requiered for each instance of the addin.

What should I do?

"Tamir" wrote:

[Quoted Text]
> Hi Cindy,
> do you know of a link to such an article, I would like to read some more
> about it.
> By he way, the second instance of the addin doesent even stop at breakpoints
> on debug - does it say something.
>
> Best regards.
>
> "Cindy M." wrote:
>
> > Hi =?Utf-8?B?VGFtaXI=?=,
> >
> > You need to assign a unique value to the .TAG property of each button, otherwise
> > the Add-in can't identify the buttons when multiple windows are open. This is
> > documented in most of the articles on creating Add-ins that you find on MSDN.
> >
> > > I wrote an addin which inserts some buttons into ms-word. When a button is
> > > pressed the addin posts a message to an automation project which does some
> > > things with the document.
> > > The problem comes into place when two documents are opened in two different
> > > windows; in this case the automation project will receive posts ONLY from the
> > > first opened document.
> > > Moreover, even if I close the first window the remaining window is ignored -
> > > i.e. no messages are being posted from its addin.
> > > I examined my automation project with Spy++ and as it seems there are no
> > > messages from the second window.
> > >
> > > Does any body knows why it happens or what to do ???
> > >
> >
> > 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 :-)
> >
> >
Re: messages from 2 addin instances
Tamir 18.09.2006 11:59:01
Cindy, it worked with the TAGs, . . . THANKS . . . . . ....

"Tamir" wrote:

[Quoted Text]
> Cindy,
> Im setting the TAG property of each button to a specific string but the
> debugger doesent even step into this line. It seems like a unique value is
> requiered for each instance of the addin.
>
> What should I do?
>
> "Tamir" wrote:
>
> > Hi Cindy,
> > do you know of a link to such an article, I would like to read some more
> > about it.
> > By he way, the second instance of the addin doesent even stop at breakpoints
> > on debug - does it say something.
> >
> > Best regards.
> >
> > "Cindy M." wrote:
> >
> > > Hi =?Utf-8?B?VGFtaXI=?=,
> > >
> > > You need to assign a unique value to the .TAG property of each button, otherwise
> > > the Add-in can't identify the buttons when multiple windows are open. This is
> > > documented in most of the articles on creating Add-ins that you find on MSDN.
> > >
> > > > I wrote an addin which inserts some buttons into ms-word. When a button is
> > > > pressed the addin posts a message to an automation project which does some
> > > > things with the document.
> > > > The problem comes into place when two documents are opened in two different
> > > > windows; in this case the automation project will receive posts ONLY from the
> > > > first opened document.
> > > > Moreover, even if I close the first window the remaining window is ignored -
> > > > i.e. no messages are being posted from its addin.
> > > > I examined my automation project with Spy++ and as it seems there are no
> > > > messages from the second window.
> > > >
> > > > Does any body knows why it happens or what to do ???
> > > >
> > >
> > > 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 :-)
> > >
> > >

Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net