none
possible to interact with the standard task panes in WORD programmatically? RRS feed

  • Question

  • Hello All: The code below successfully opens the Word RESEARCH Task Pane.  No problem there. 

            Dim oWord As Word.Application
            Dim oDoc As Word.Document
            oWord = CreateObject("Word.Application")
            oWord.Visible = True
            oDoc = oWord.Documents.Add
            Dim tp As Word.TaskPane
            tp = oWord.TaskPanes(3) '3 = "wdTaskPaneResearch"
            tp.Visible = True
            
    
    But now I would like to take the next steps programmatically: 1) select the Encarta Dictionary, 2) type in a word in the search box, 3) click the "Start Searching" button, and 4) retrieve the results into some kind of variable in my code where I will extract the information I need.  Is any of this even possible programmatically, or do the task panes in word only let you set the VISIBLE property and nothing else?  I've GOOGLED 'Task Pane' and "Encarta API", and looked through the WORD Object Model, but had no luck.  Any suggestions?  Thanks,  Al

    • Moved by Paul Zhou Wednesday, February 1, 2012 5:29 AM move for better support (From:.NET Base Class Library)
    Sunday, January 29, 2012 3:11 PM

Answers

  • Hi Al

    Basically, they only let you set the Visible, Width and similar properties (properties belonging to the CommandBars, which "host" the task pane content). The content of task panes "belongs" to the program that runs them and is generally not exposed.

    When it is exposed, it's not via the task pane itself, but the API. Such as the Styles task pane or the (now defunct) XML Structure task pane.

    There's nothing in the Word API for working with the Research task pane, although there is support for the developer to create his own Research services and have these appear in the task pane. Research for the most part uses public (or subscribed) web services. So theoretically you could "roll your own" in order to access the information in which you're interested.


    Cindy Meister, VSTO/Word MVP
    • Marked as answer by Al Loup Wednesday, February 1, 2012 10:22 AM
    Wednesday, February 1, 2012 7:26 AM
    Moderator

All replies

  • I'm moving this thread to Word for Developers forum to get better support.

    Have a nice day. 


    Paul Zhou [MSFT]
    MSDN Community Support | Feedback to us
    Wednesday, February 1, 2012 5:30 AM
  • Hi Al

    Basically, they only let you set the Visible, Width and similar properties (properties belonging to the CommandBars, which "host" the task pane content). The content of task panes "belongs" to the program that runs them and is generally not exposed.

    When it is exposed, it's not via the task pane itself, but the API. Such as the Styles task pane or the (now defunct) XML Structure task pane.

    There's nothing in the Word API for working with the Research task pane, although there is support for the developer to create his own Research services and have these appear in the task pane. Research for the most part uses public (or subscribed) web services. So theoretically you could "roll your own" in order to access the information in which you're interested.


    Cindy Meister, VSTO/Word MVP
    • Marked as answer by Al Loup Wednesday, February 1, 2012 10:22 AM
    Wednesday, February 1, 2012 7:26 AM
    Moderator