locked
How Do I Activate the Word Navigation (Search) Task Pane in a Macro? RRS feed

  • Question

  • I'm using Word 2010 (up-to-date version 14, 32 bit) under Windows 7 (64 bit).  I would like to write a macro in Word to open the Navigation (search) task pane and "activate" it (so that the insertion point is flashing in the Search Docuent field).  This can be done manually with the mouse by clicking Home, Find.  But for some reason the macro recorder won't record that.

    So far, I've got the following macro that opens the task pane, but doesn't activate it:

    Sub DocumentMap()
    ActiveWindow.DocumentMap = True
    xxx

    'Command attempts that failed:
    '  ActiveDocument.ActiveWindow.Panes(2).Activate
    '  ActiveDocument.ActiveWindow.Panes(0).Activate
    '  ActiveWindow.DocumentMap.SetFocus
    '  CommandBars("Navigation").SetFocus

    End Sub

    Can you suggest what I should replace the xxx with to activate the pane?

    Thanks for your help,

    Don Macnaughton


    <object height="1" id="plugin0" style=";z-index:1000;" type="application/x-dgnria" width="1"><param name="tabId" value="{956DCFA5-027F-4223-AB28-75EC0E9E0EB7}" /></object>
    • Edited by Don Macnaughton Friday, October 18, 2013 3:57 PM corrected unexpected HTML code at start
    Friday, October 18, 2013 3:53 PM

Answers