VBA & Macro Problems

Open the Navigation Pane Automatically in Word 2019 with a Macro

Phi Hung VoPhi Hung Vo Nov 13, 2026 868 views

Question details

The user wants Word 2019 to display the Navigation pane automatically when a document opens.

Open the Navigation Pane Automatically in Word 2019 with a Macro
Product
Microsoft Word 2019
Device & OS
not provided
Scenario
A user wants the Navigation pane available without opening it manually each time.
Observed behavior
The desired result is for a document-opening macro to make the Navigation pane visible.
Before you start

Open the document in Word 2019 and check whether it can be saved as a macro-enabled file. Your macro security settings must permit the macro to run; use a trusted location or follow your organization's security policy.

Solution 1Recommended

Add a Document_Open macro to the document

Use this method when the Navigation pane should open automatically for a particular document.

1
Open the VBA editor

Open the document in Word and press Alt+F11. In the Project Explorer, find the project's ThisDocument item and double-click it.

2
Create the open event

In the ThisDocument code window, select Document from the left dropdown and Open from the right dropdown.

3
Show the pane

Between the generated Private Sub Document_Open() and End Sub lines, enter: Application.TaskPanes(wdTaskPaneNav).Visible = True

4
Save and test

Return to Word, choose File > Save As, and save the document as a Word Macro-Enabled Document (.docm). Close and reopen it, enabling macros only if you trust the file and your security policy permits it.

Add a Document_Open macro to the document
Macro security: The pane will not open through the macro if Word blocks the code. Do not enable macros in documents from untrusted sources.
Free Microsoft Office alternative

Use WPS Writer as an alternative for navigating documents

WPS Office is a free, lightweight alternative with a familiar interface and compatibility with common Word formats, making it easy to move documents between suites. It does not fix Word's macro behavior, and VBA compatibility can vary.

Navigate document headings in WPS WriterOpen and edit Microsoft Word DOC and DOCX filesWork in a familiar, easy-to-use office interfaceMove documents between Word and WPS Office
microsoft office alternative - wps office

Frequently Asked Questions

Why doesn't the Navigation pane open when I reopen the document?

Check that the Document_Open code is in the document's ThisDocument module and that the file is saved as .docm. Word must also be allowed to run the trusted macro under your security settings.

Can I save the macro in a regular DOCX file?

No. Use File > Save As and select Word Macro-Enabled Document (.docm) to retain a macro stored in the document.

Will the Normal template macro run for a new document?

AutoOpen is intended for opening existing documents. A separate AutoNew macro is needed if you also want the pane to open when a new document is created.

How can I open the Navigation pane without a macro?

In Word, select View > Navigation Pane. This opens the pane for the current session without running VBA code.