none
Customizing Taskpane based on XMLNode Context RRS feed

  • Question

  • Hi,

    Is it possible to customize the task Pane depends on the context of the current XMLNode?

    I developed an Application level project using VSTO 2008 Pro. I programatically created XMLNodes in the ActiveDocument and I need to show some information depends on the current XMLnode.

     


    Antony
    Thursday, November 10, 2011 2:48 AM

Answers

  • Hi Antony

    WindowSelectionChange will have a performance hit. How noticieable it is will depend on exactly what it has to do. But that's going to be your only possibility in an add-in.

    If this were a SmartDocument solution, then the functionality would be built into the Actions Pane, to a certain extent...

    There's also an XMLSelectionChange event that should trigger when the selection changes nodes (in reference to the attached schema). But in practice that has proven to be somewhat unreliable if the schema reflects a one-to-many type of structure. As I recall, it doesn't trigger if the user changes from one node into another node with the same name, in the same hierarchy level.


    Cindy Meister, VSTO/Word MVP
    Thursday, November 10, 2011 7:41 AM
    Moderator

All replies

  • Hi Antony

    Theoretically, yes, this is possible, using the WindowSelectionChange event. Which version of Word are you targeting, and what are the plans for upgrading the version of Office being used?

    I ask, because this technology has been pulled out of Office 2007 and Office 2010...


    Cindy Meister, VSTO/Word MVP
    Thursday, November 10, 2011 6:16 AM
    Moderator
  • Thanks Meister,

    My application is running in Word 2007 purchased before 1/11/2010 . The basement of my application is XML Schema and CustomXMLNodes. Converting xmlNode to Contentent Control is not possible at this time.

    Will WindowSelectionChange event slow down other Functions which uses Selection Object. Because we are programetially manipulating data and xml nodes during runtime.

    Thanks.


    Antony
    Thursday, November 10, 2011 7:31 AM
  • Hi Antony

    WindowSelectionChange will have a performance hit. How noticieable it is will depend on exactly what it has to do. But that's going to be your only possibility in an add-in.

    If this were a SmartDocument solution, then the functionality would be built into the Actions Pane, to a certain extent...

    There's also an XMLSelectionChange event that should trigger when the selection changes nodes (in reference to the attached schema). But in practice that has proven to be somewhat unreliable if the schema reflects a one-to-many type of structure. As I recall, it doesn't trigger if the user changes from one node into another node with the same name, in the same hierarchy level.


    Cindy Meister, VSTO/Word MVP
    Thursday, November 10, 2011 7:41 AM
    Moderator
  • Thanks for Additional Infos.

    I had checked XMLSelectionChange Event. It works fine for my Requirement.

     


    Antony
    Thursday, November 10, 2011 8:45 AM