2

i am developing a VSTO addin for Word.it has a toggle button in the ribbon to view and hide a taskpane. I did much of the functionality but the problem is the taskpane is not added when we are working with multiple documents. It shows the taskpane only in one document, and the toggle button also affects the other taskpane in the another document.

I used this procedure to create a taskpane in each document but it is not working:

public void AddAllCalendarTaskPanes()
    {
        if (Globals.WritingAssistant.Application.Documents.Count > 0)
        {
            if (this.Application.ShowWindowsInTaskbar == true)
            {
                foreach (Word.Document _doc in this.Application.Documents)
                {
                    AddCalendarTaskPane(_doc);
                }
            }

        }
    }
Cindy Meister
  • 25,071
  • 21
  • 34
  • 43
  • 2
    Possible duplicate of [Creating and managing custom task panes for multiple documents in a VSTO Word addin](https://stackoverflow.com/questions/22560441/creating-and-managing-custom-task-panes-for-multiple-documents-in-a-vsto-word-ad) – Chris May 04 '18 at 13:09

0 Answers0