How to find folder (full folder path) by folder name in Outlook?
For instance, on Navigation pane you move a folder and drop to an unknown folder by mistake in Outlook, you want to restore this folder but cannot find out it immediately. Unfortunately, Outlook does not support the Find feature same as that in Microsoft Word or Excel. Do not worry! You can apply a VBA macro to solve this problem in Outlook.
Quickly Search and open folders by folder name with an amazing tool
In general, we can search folders by folder name with VBA code. Most VBA code can search folders in the current mailbox, and open the first found folder only. Now with the Go To feature of Kutools for Outlook, you can easily find folders by folder name easily, and open anyone of found folders as you need. Click for 60-day free trial without limitation!
Find folder (full folder path) by folder name with VBA
Please follow below steps to search for folders by folder names with VBA in Outlook.
1. Press Alt + F11 keys together to open the Microsoft Visual Basic for Applications window.
2. Click Insert > Module, and then paste below VBA code into the new Module window.
VBA: Search and open folders by folder name in Outlook
Private m_Folder As MAPIFolder
Private m_Find As String
Private m_Wildcard As Boolean
Private Const SpeedUp As Boolean = True
Private Const StopAtFirstMatch As Boolean = True
Public Sub FindFolder()
Dim sName As String
Dim oFolders As Folders
Set m_Folder = Nothing
m_Find = ""
m_Wildcard = False
sName = InputBox("Find:", "Search folder")
If Len(Trim(sName)) = 0 Then Exit Sub
m_Find = sName
m_Find = LCase(m_Find)
m_Find = Replace(m_Find, "%", "*")
m_Wildcard = (InStr(m_Find, "*"))
Set oFolders = Application.Session.Folders
If Not m_Folder Is Nothing Then
If MsgBox("Activate folder: " & vbCrLf & m_Folder.FolderPath, vbQuestion Or vbYesNo) = vbYes Then
Set Application.ActiveExplorer.CurrentFolder = m_Folder
MsgBox "Not found", vbInformation
Private Sub LoopFolders(Folders As Outlook.Folders)
Dim oFolder As MAPIFolder
Dim bFound As Boolean
If SpeedUp = False Then DoEvents
For Each oFolder In Folders
If m_Wildcard Then
bFound = (LCase(oFolder.Name) Like m_Find)
bFound = (LCase(oFolder.Name) = m_Find)
If bFound Then
If StopAtFirstMatch = False Then
If MsgBox("Found: " & vbCrLf & oFolder.FolderPath & vbCrLf & vbCrLf & "Continue?", vbQuestion Or vbYesNo) = vbYes Then
bFound = False
If bFound Then
Set m_Folder = oFolder
If Not m_Folder Is Nothing Then Exit For
3. Press F5 key or click the Run button to run this VBA.
4. In the popping out Search folder dialog box, please type the specified folder name you will search by, and click the OK button. See screenshot:
Note: This VBA supports asterisk wildcard. For example, you can type tes* to find out all folders whose name begin with tes.
5. Now a dialog box comes out and shows the folder path of found folder. If you need to open the found folder, please click the Yes button.
And now the found folder is opening on the Navigation pane as below screenshot shown:
Note: If there are more than one folders named with the specified name, this VBA can find and open one folder only.
Search folder by folder name by an amazing tool
If you have Kutools for Outlook installed, you can apply its Go To feature to quickly find out all folders by a certain folder name, and easily open anyone found folders too.
1. Click Kutools Plus > Go To to enable this feature.
2. In the Go To dialog, please type the specified folder name in the Search box, select a folder in the search results, and click the Ok button.
Now the specified folder with the certain folder name is found and opened immediately.
Automatically expand all folders when starting Outlook Generally speaking, if you expand or collapse a folder on the Navigation Pane and then close the Outlook, the folder will remain expanding or collapsing when restarting Outlook. But now, is there a way to expand all folders automatically when starting Outlook?
Change a subfolder to folder in Outlook For example, there is a subfolder under the Inbox folder in Outlook, and now you want to move the subfolder out of the Inbox folder, and save it as an independent folder, how could you get it done?
Delete multiple folders in bulk in Outlook As you know, you can select and delete one folder on the Navigation pane at a time in Outlook, and it seems impossible to select multiple folders in bulk. However, it will be too tedious to delete multiple folders one by one from the Navigation Pane. This article will introduce a solution to quickly delete multiple folders in bulk from Outlook.
Wow - this is an amazing function, which will make my daily usage of Outlook tons faster.
Thank you so much for publishing!!
A tip for those interested:
If you want to search only INBOX-folders, without public folders etc.
This made it a lot faster for me because the public folder are remote, so the search is quite slow.
And also I'm not interested in those results.
Replace line 24 with:
Set oFolders = GetNamespace("MAPI").GetDefaultFolder(olFolderInbox).Folders