The navigation pane can be opened with:
ActiveWindow.DocumentMap = True
However, this is a simple property. There is no object to represent the document map. So alas, what you want does not seem to be possible unless you go to extremes.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Using VBA, how do I set the Navigation Pane display to the "Results" group rather than "Headings" or "Pages"?
Here is the code I use for auto-opening a document to the Navigation Pane.
Sub AutoOpen()
Application.GoBack
Selection.MoveDown Unit:=wdLine, Count:=10
Selection.MoveUp Unit:=wdLine, Count:=10
Call NavPaneSearch
End Sub
Sub NavPaneSearch()
' NavigationPaneSize Macro
' Charles Kenyon 18 October 2018
Dim iWidth As Integer
iWidth = 218 ' change to suit
With Application.CommandBars("Navigation")
.Visible = True
.Width = iWidth
End With
End Sub
Thank you!
The navigation pane can be opened with:
ActiveWindow.DocumentMap = True
However, this is a simple property. There is no object to represent the document map. So alas, what you want does not seem to be possible unless you go to extremes.
form subclassing. processing windows messages of the window involved. spy++. I did a quick test and I'm not even sure that would get you there.
If these concepts are foreign, <NYC accent> Forget about it </>