none
Default Task Pane App for Word RRS feed

  • Question

  • Hi,

    Is it possible to have my favorite task pane app (agave app) show for all the word documents on my system?

    Everytime I have to go to apps for office and insert the app I want explicitly for every document. Can I set a default task pane app somewhere?

    Thanks.

    Thursday, October 4, 2012 1:36 AM

Answers

  • Dear DOT Net Coder; thanks for your question, its a great one! this is a behavior known in the VSTO world as 'Applciation Level Task Panes', The short answer is this is not supported in apps for Office.

    Long answer starts here: The way to think about it is: inserting an app for Office, (even if its a taskpane) is like if you insert an image in a document, its part of it and in fact its stored in the file format (see sample xml below on how it looks like), it will be part of the document for ever. What this means is even if the users closes the task pane, the file format entry of the App will still be part of the document, this is awesome, because  if the app established bindings or settings in the document becasue they could be restored when the app is re-inserted on this document. The only way to completely get rid of it is by crack-opening the OOXML of the document and remove it from there.

    <?xml version="1.0" encoding="UTF-8" standalone="true"?>
    <we:webextension id="{740E6410-48F5-4B77-9973-37C648BC2B39}" xmlns:we="<we:reference">http://schemas.microsoft.com/office/webextensions/webextension/2010/11"><we:reference id="someGUID" storeType="OMEX" store="en-US" version="1.0.0.0"/><we:alternateReferences/>-<we:properties><we:property value=""foo"" name="SKU"/><we:property value=""bar"" name="DEFAULTTEMPLATE"/><we:property value="false" name="DIRTY"/></we:properties><we:bindings/><we:snapshot xmlns:r="</we:webextension">http://schemas.openxmlformats.org/officeDocument/2006/relationships"/></we:webextension>

    That said, one option for you is to crack open the default document tempate that opens with word, inject the XML with your favorite app and it will allways open! - never tried that before but it should work....

    thanks for Asking and reading!

    Juan.

    Thursday, October 4, 2012 6:26 PM
    Moderator

All replies

  • Dear DOT Net Coder; thanks for your question, its a great one! this is a behavior known in the VSTO world as 'Applciation Level Task Panes', The short answer is this is not supported in apps for Office.

    Long answer starts here: The way to think about it is: inserting an app for Office, (even if its a taskpane) is like if you insert an image in a document, its part of it and in fact its stored in the file format (see sample xml below on how it looks like), it will be part of the document for ever. What this means is even if the users closes the task pane, the file format entry of the App will still be part of the document, this is awesome, because  if the app established bindings or settings in the document becasue they could be restored when the app is re-inserted on this document. The only way to completely get rid of it is by crack-opening the OOXML of the document and remove it from there.

    <?xml version="1.0" encoding="UTF-8" standalone="true"?>
    <we:webextension id="{740E6410-48F5-4B77-9973-37C648BC2B39}" xmlns:we="<we:reference">http://schemas.microsoft.com/office/webextensions/webextension/2010/11"><we:reference id="someGUID" storeType="OMEX" store="en-US" version="1.0.0.0"/><we:alternateReferences/>-<we:properties><we:property value=""foo"" name="SKU"/><we:property value=""bar"" name="DEFAULTTEMPLATE"/><we:property value="false" name="DIRTY"/></we:properties><we:bindings/><we:snapshot xmlns:r="</we:webextension">http://schemas.openxmlformats.org/officeDocument/2006/relationships"/></we:webextension>

    That said, one option for you is to crack open the default document tempate that opens with word, inject the XML with your favorite app and it will allways open! - never tried that before but it should work....

    thanks for Asking and reading!

    Juan.

    Thursday, October 4, 2012 6:26 PM
    Moderator
  • Thanks Juan. Since it is going to be part of the document, when the documents are distributed out to say other users, the task pane will still be part of it, right?

    1) Can we remove the task pane using Open Xml SDK? So before we distribute the documents, we want to get rid of the task pane.

    2) On close of the word document, is it possible to remove the task pane association some how without users explicity closing it?

    Thursday, October 4, 2012 7:09 PM
  • For the first question yes, if you email that document (and the user has Word 2013) then the task pane app will show up (if the document was saved with the task pane open, this will not happen if the document was saved with the task pane closed)

    Yes you can remove and add an app for Office (that includes content and  task pane apps) with the Open XML SDK, i will add some sample or a blog entry on how to do it.

    And finally no, on document close you cannot remove the task pane association programmatically, you need to manually close it.

    Thursday, October 4, 2012 7:54 PM
    Moderator
  • Thanks a lot. Please send me to code sample to remove the task pane using Open XML SDK.
    Thursday, October 4, 2012 8:34 PM
  • I'll keep an eye Juan's new blog or samples too.

    Forrest Guo | MSDN Community Support | Feedback to manager

    Friday, October 12, 2012 3:06 AM
    Moderator