Hi;

First off, this is a C# IDTExtensibility2 (not VSTO) add-in - under
Word 2003.

Ok, here's the really weird bug.
Start Word
From Word select new document so I get a second instance of Word.
Close the first Word application.
Close the document in the second instance of word.

Now my CommandBarControl objects from the menu I created throw an
exception when I try to access their Enabled property.

The menu is still there.

This does not happen if the first instance of word is the one I close
the document in.

Any ideas?

thanks - dave

Re: menu objects disappearing - if 2nd Word, close 1st Word, close document by Ralf

Ralf
Thu Aug 26 09:52:02 CDT 2004

"David Thielen" <david@windward.net> schrieb im Newsbeitrag
news:etvoe05j1jvomabsemj3ubb84u8mgc9p7a@4ax.com...

> First off, this is a C# IDTExtensibility2 (not VSTO) add-in - under
> Word 2003.
>
> Ok, here's the really weird bug.
> Start Word
> From Word select new document so I get a second instance of Word.
> Close the first Word application.
> Close the document in the second instance of word.
>
> Now my CommandBarControl objects from the menu I created throw an
> exception when I try to access their Enabled property.
>
> The menu is still there.
>
> This does not happen if the first instance of word is the one I close
> the document in.
>
> Any ideas?

Hello,

as far as i know each menu/toolbar/button that you are using in DIFFERENT
windows has to have a unique "Tag" value. Try setting a "Tag" value for all
of your GUI parts and it should work.

Ciao,
Ralf