Multiple documents open simultaneously using same assembly? RRS feed

  • Question

  • Greetings fellow VSTO'ers,

    I have a Word Template which uses an Assembly Customization.  One of the controls that I have is a command bar which includes several buttons.  Each of these buttons spawn a System.Windows.Form, which prompts the user for data; once the data is confirmed, interOP code manipulates the word document accordingly.

    An example of the word manipulation code behind one of the buttons is:

                    Globals.ThisDocument.ReportCoverDateNode.Text = selectedDate.ToString("MMMM d, yyyy");



     When I open 1 document that uses this template all is well; and the buttons work fine and modify the 1 open document.  However, when I open more than 1 document at the same time that use this template, I am running into issues.  The customization seems to load fine for all subsequent documents, however when I click on a button in the commandbar, the resulting interOP manipulation only affects the very first document.

    It seems like each document is opening on the same thread?  How do I resolve this problem so that multiple documents using the same assembly customization can be open at the same time?

    Thanks in advance!

    Monday, February 5, 2007 10:28 PM


  • You might have a bug in how you subscribe to the event. I will close this thread but if you still experience the problem please re-activate the thread and post your code and I will take a closer look at it .
    Thursday, April 5, 2007 9:15 PM