How to Select and Navigate to an Outlook Folder Found by VBA Search
Question details
The user needs a method to select a specific folder from recursive VBA search results and automatically navigate to it in the Outlook folder pane.

- Product
- Microsoft Outlook
- Device & OS
- not provided
- Scenario
- Writing or modifying an Outlook VBA script to search for folders by name and jump to the selected match within the Outlook user interface.
- Observed behavior
- The current VBA code successfully finds and prints matching folder names, but lacks the functionality to actively select and display the chosen folder in the navigation pane.
Before modifying your script, ensure you have enabled the Developer tab in Outlook, backed up your existing macros, and have a basic understanding of the Outlook Explorer object model.
Use the Explorer.CurrentFolder Property to Navigate
Assign the located folder object to the CurrentFolder property of the active Outlook Explorer to change the view in the navigation pane.
To interact with the Outlook user interface via VBA, you must utilize the Explorer object. When a user selects a folder from your search results, you can programmatically point the active Explorer to that folder.
Design a UserForm with a ListBox (or a similar UI control) to display the matching folder names found by your recursive search.
As your search loops through the folders, store the corresponding MAPIFolder objects or their EntryID strings in a Collection or Array that maps to the ListBox items.
Write a click event handler for the ListBox or a command button that retrieves the specific folder object the user has selected.
Execute the command 'Set Application.ActiveExplorer.CurrentFolder = selectedFolderObject' to immediately jump to and highlight that folder in the Outlook navigation pane.

Looking for a Lighter Office Suite? Try WPS Office
While this VBA solution specifically targets Microsoft Outlook's email environment, if you are looking for a fast, free, and lightweight alternative for your document, spreadsheet, and presentation needs, WPS Office is an excellent choice. It provides a familiar interface and seamless compatibility with Microsoft formats.
- 1. Download the installer: Visit the official WPS Office website and download the free installer for your operating system.
- 2. Install the suite: Run the setup file and follow the on-screen instructions to install WPS Office on your device.
- 3. Open existing files: Launch WPS Office and open your existing Microsoft Office documents, spreadsheets, and presentations instantly.

Frequently Asked Questions
Can I use an EntryID instead of the folder object to navigate?
Yes. If you store the EntryID and StoreID during your search, you can use 'Application.Session.GetFolderFromID(EntryID, StoreID)' to retrieve the folder object, and then assign it to 'ActiveExplorer.CurrentFolder'.
Why doesn't the folder pane update when I set CurrentFolder via VBA?
Ensure that the ActiveExplorer is visible and properly initialized. If you are running the code when no Explorer window is open, you may need to call 'Folder.Display' instead, which opens a new window focusing on that folder.
Does WPS Office support Outlook VBA scripts?
No, WPS Office does not include an email client equivalent to Microsoft Outlook, so it does not support Outlook-specific VBA scripts or the Outlook Explorer object model. However, WPS does support VBA for word processing and spreadsheets.




