none
Change the Parent Window of Custom Task Pane RRS feed

  • Question

  • I would like to create a single custom task pane which is always shown in the current active Word document window. When the active document is changed, the parent window of the task pane is changed accordingly. Because the pane carries some information shared by all documents, I cannot create one new task pane for each document.

    Can anyone tell me if it's possible and how to do it?

    Thanks.



    • Edited by James Z Wang Thursday, November 14, 2013 6:50 PM
    Wednesday, November 13, 2013 12:07 AM

Answers

  • <<I tired to set ShowWindowsInTaskbar to false>>

    As this functionality is deprecated and no longer supported in Word 2013 (and probably newer versions after that) this is not a good approach.

    What kind of information cannot be stored in a global variable, but be displayed in a task pane?


    Cindy Meister, VSTO/Word MVP, my blog

    Friday, November 15, 2013 4:15 PM
    Moderator
  • Hi James

    Wouldn't it be possible to provide the information the other thread generated in a web service that could be accessed multiple times? Or write it to an XML file so that it can be accessed multiple times?

    Custom Task Panes are designed to NOT work the way you describe and I don't know of any way to force them to do so. Standard procedure is to use code to co-ordinate them...


    Cindy Meister, VSTO/Word MVP, my blog

    Friday, November 15, 2013 5:05 PM
    Moderator

All replies

  • Hi,

    For my understanding , You want to switch the parent window of single user control instance.if the Task pane carries some information shared in all documents.I suggest  you’d better to put them into a global variable.

    Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, November 15, 2013 11:57 AM
  • It's some information which cannot be stored in global variable.

    I tired to set ShowWindowsInTaskbar to false. The problem with this solution is sometimes when a document is opened, the task pane is shown with the new document, but when more documents are openned, the task pane just disappear. Word is not consistent.

    Friday, November 15, 2013 3:12 PM
  • <<I tired to set ShowWindowsInTaskbar to false>>

    As this functionality is deprecated and no longer supported in Word 2013 (and probably newer versions after that) this is not a good approach.

    What kind of information cannot be stored in a global variable, but be displayed in a task pane?


    Cindy Meister, VSTO/Word MVP, my blog

    Friday, November 15, 2013 4:15 PM
    Moderator
  • In the task pane, I launched an thread which read data from a bench of Word documents. When user or application opens another document, I would like the pane to be shown on the new document while the application keeps running.


    Friday, November 15, 2013 4:38 PM
  • Hi James

    Wouldn't it be possible to provide the information the other thread generated in a web service that could be accessed multiple times? Or write it to an XML file so that it can be accessed multiple times?

    Custom Task Panes are designed to NOT work the way you describe and I don't know of any way to force them to do so. Standard procedure is to use code to co-ordinate them...


    Cindy Meister, VSTO/Word MVP, my blog

    Friday, November 15, 2013 5:05 PM
    Moderator
  • Thank you for your suggestion.

    James

    Friday, November 15, 2013 5:33 PM