I\'m developing a Word 2007-2010 addin using VSTO in Visual Studio 2008. In my addin, I need a custom task pane for each open word document. Basically, I need to create a ta
This problem is detailed in this MSDN article titled Managing Task Panes in Multiple Word and InfoPath Documents
You have to create a method that removes orphan CTPs (ie those that no longer have windows attached).
I have followed this article and successfully implemented a CustomTaskPane manager that removes the orphans.