Others

How to Select and Navigate to an Outlook Folder Found by VBA Search

Huma Ashraf ChHuma Ashraf Ch Oct 8, 2026 870 views

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.

How to Select an Outlook Folder Found by VBA Search
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 you start

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.

Solution 1Recommended

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.

1
Create a selection interface

Design a UserForm with a ListBox (or a similar UI control) to display the matching folder names found by your recursive search.

2
Store the folder identifiers

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.

3
Capture the user's selection

Write a click event handler for the ListBox or a command button that retrieves the specific folder object the user has selected.

4
Set the CurrentFolder

Execute the command 'Set Application.ActiveExplorer.CurrentFolder = selectedFolderObject' to immediately jump to and highlight that folder in the Outlook navigation pane.

Use the Explorer.CurrentFolder Property to Navigate
Developer Communities: For highly complex Outlook VBA questions or advanced UserForm implementations, consider posting your code on developer forums like Microsoft Q&A or Stack Overflow.
Free Microsoft Office alternative

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. 1. Download the installer: Visit the official WPS Office website and download the free installer for your operating system.
  2. 2. Install the suite: Run the setup file and follow the on-screen instructions to install WPS Office on your device.
  3. 3. Open existing files: Launch WPS Office and open your existing Microsoft Office documents, spreadsheets, and presentations instantly.
Highly compatible with Microsoft Word, Excel, and PowerPoint formats (.docx, .xlsx, .pptx).Lightweight installation that runs smoothly without consuming heavy system resources.Familiar tabbed user interface, allowing for a seamless transition and reduced learning curve.Built-in PDF reader and editor to streamline your document workflow.
microsoft office alternative - wps office

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.