Denis Pitcher

I've got an odd issue that I'm uncertain how to resolve.

I'm running VSTO 2005SE with Office 2K3.

I've added buttons to the toolbars that open windows.

The odd thing is that when I click the button, it opens as many windows as there are powerpoint instances. I have no idea why a click in one instance causes the event to be run in all.

I've tried setting it so that it checks to see if the window already exists but because they're being opened by separate instances, this does not work.

Any recommendations would be appreciated.

Thanks

Denis

---

www.21square.com




Re: Visual Studio Tools for Office Multiple windows

X4U

Hello Denis,

track each open window with a unique ID in a collection and assign

the button of the window this ID in the Tag property.

When the click event occures check if the Tag-ID = Window ID and execute that code.

I have a sample there, but only for Outlook - but it's the same technique.

http://www.x4u.de/Programming/Outlook/Codesnippets/tabid/61/Default.aspx

Have a look at the X4UTools sample

In Outlook the Windows are called Inspectors.

Hope this helps,

greets, Helmut






Re: Visual Studio Tools for Office Multiple windows

Denis Pitcher

Thanks Helmut,

Your suggestion helped me realize a way I could achieve what I wanted.

Denis