How to Open Navigation Pane and Show Pages View in Word 365 VBA
Question details
The user wants to use a VBA script to automatically display the Word Navigation Pane and specifically set it to the Pages view.

- Product
- Word 365
- Device & OS
- not provided
- Scenario
- Developing a Word macro to configure the document's user interface by opening the Navigation Pane to a specific tab upon launch.
- Observed behavior
- VBA can successfully make the Navigation Pane visible, but it cannot programmatically switch the pane from the default Headings view to the Pages view.
Ensure that the Developer tab is enabled in your Word ribbon and that macros are permitted in your Trust Center settings before writing or running VBA scripts.
Open and Configure the Navigation Pane Using VBA
Use VBA code to display the Navigation Pane, set its position, and adjust its width, followed by a manual selection of the Pages tab.
While Word VBA allows you to display the Navigation Pane and configure its position, Microsoft does not provide a direct VBA method or property to switch the pane to the 'Pages' view programmatically. You will need to open the pane via code and select the 'Pages' tab manually.
Press Alt + F11 on your keyboard to launch the Microsoft Visual Basic for Applications editor.
Insert a new Module and add the following line of code to make the pane visible: `Application.TaskPanes(wdTaskPaneNav).Visible = True`.
Optionally, set the pane's location and size by adding: `Application.CommandBars("Navigation").Position = msoBarLeft` and `Application.CommandBars("Navigation").Width = 350`.
Run the macro to display the pane on the left side of your screen, then manually click the 'Pages' tab within the Navigation Pane.

Try WPS Office for a Streamlined Document Experience
If you frequently encounter VBA limitations in Microsoft Word, consider switching to WPS Office. It offers a lightweight, highly compatible alternative with intuitive built-in navigation features that require no complex coding for everyday document management.
- 1. Download WPS Office: Visit the official WPS website and download the free installation package.
- 2. Install the Software: Run the installer and follow the on-screen prompts to complete the setup.
- 3. Open Your Documents: Launch WPS Writer and open your existing Word documents seamlessly to enjoy built-in page navigation.

Frequently Asked Questions
Why does my Navigation Pane sometimes open in Pages view automatically?
Word occasionally remembers the state of the Navigation Pane from when the document was last saved. However, this caching behavior is inconsistent across different devices and cannot be relied upon for automated VBA processes.
Can I use SendKeys to switch to the Pages view in VBA?
While you can theoretically use `Application.SendKeys` to simulate keyboard shortcuts to navigate the pane's tabs, it is highly unreliable, depends on the user's cursor focus, and is generally discouraged in professional VBA development.
Is there a way to hide the Navigation Pane using VBA?
Yes, you can easily hide the Navigation Pane by changing the visibility property to False: `Application.TaskPanes(wdTaskPaneNav).Visible = False`.




