Skip to main content

Kutools for Office — One Suite. Five Tools. Get More Done.

How to find folder (full folder path) by folder name in Outlook?

Author Kelly Last modified

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.


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
LoopFolders oFolders

  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
End If
Else
MsgBox "Not found", vbInformation
End If
End Sub

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)
Else
bFound = (LCase(oFolder.Name) = m_Find)
End If

    If bFound Then
If StopAtFirstMatch = False Then
If MsgBox("Found: " & vbCrLf & oFolder.FolderPath & vbCrLf & vbCrLf & "Continue?", vbQuestion Or vbYesNo) = vbYes Then
bFound = False
End If
End If
End If
If bFound Then
Set m_Folder = oFolder
Exit For
Else
LoopFolders oFolder.Folders
If Not m_Folder Is Nothing Then Exit For
End If
Next
End Sub

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.
doc-search-by-folder-name-1
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.
doc-search-by-folder-name-2

And now the found folder is opening on the Navigation pane as below screenshot shown:
doc-search-by-folder-name-3

Note: If there are more than one folders named with the specified name, this VBA can find and open one folder only.

AI Mail Assistant in Outlook: Smarter Replies, Clearer Communication (one-click magic!) FREE

Streamline your daily Outlook tasks with the AI Mail Assistant from Kutools for Outlook. This powerful tool learns from your past emails to offer intelligent and accurate responses, optimize your email content, and help you draft and refine messages effortlessly.
doc ai email handle

This feature supports:

  • Smart Replies: Get responses crafted from your past conversations—tailored, precise, and ready to go.
  • Enhanced Content: Automatically refine your email text for clarity and impact.
  • Effortless Composition: Just provide keywords, and let AI handle the rest, with multiple writing styles.
  • Intelligent Extensions: Expand your thoughts with context-aware suggestions.
  • Summarization: Get concise overviews of long emails instantly.
  • Global Reach: Translate your emails into any language with ease.

This feature supports:

  • Smart email replies
  • Optimized content
  • Keyword-based drafts
  • Intelligent content extension
  • Email summarization
  • Multi-language translation

Best of all, this feature is completely free forever! Don’t wait—download AI Mail Assistant now and enjoy!


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.

Say goodbye to Outlook inefficiency! Kutools for Outlook makes batch email processing easier - now with free AI-powered features! Download Kutools for Outlook Now!!

1. Click "Kutools Plus" > "Go To" to enable this feature.
doc-search-by-folder-name-4

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.
doc-search-by-folder-name-5

Now the specified folder with the certain folder name is found and opened immediately.
doc-search-by-folder-name-6


Related articles:


Best Office Productivity Tools

Breaking News: Kutools for Outlook Launches Free Version!

Experience the all-new Kutools for Outlook with 100+ incredible features! Click to download now!

🤖 Kutools AI : Uses advanced AI technology to handle emails effortlessly, including replying, summarizing, optimizing, extending, translating, and composing emails.

📧 Email Automation: Auto Reply (Available for POP and IMAP)  /  Schedule Send Emails  /  Auto CC/BCC by Rules When Sending Email  /  Auto Forward (Advanced Rules)   /  Auto Add Greeting   /  Automatically Split Multi-Recipient Emails into Individual Messages ...

📨 Email Management: Recall Emails  /  Block Scam Emails by Subjects and Others  /  Delete Duplicate Emails  /  Advanced Search  /  Consolidate Folders ...

📁 Attachments ProBatch Save  /  Batch Detach  /  Batch Compress  /  Auto Save   /  Auto Detach  /  Auto Compress ...

🌟 Interface Magic: 😊More Pretty and Cool Emojis   /  Remind you when important emails come  /  Minimize Outlook Instead of Closing ...

👍 One-click Wonders: Reply All with Attachments  /   Anti-Phishing Emails  /  🕘Show Sender's Time Zone ...

👩🏼‍🤝‍👩🏻 Contacts & Calendar: Batch Add Contacts From Selected Emails  /  Split a Contact Group to Individual Groups  /  Remove Birthday Reminders ...

Use Kutools in your preferred language – supports English, Spanish, German, French, Chinese, and 40+ others!

Instantly unlock Kutools for Outlook with a single click. Don't wait, download now and boost your efficiency!

kutools for outlook features1 kutools for outlook features2

🚀 One-Click Download — Get All Office Add-ins

Strongly Recommended: Kutools for Office (5-in-1)

One click to download five installers at once — Kutools for Excel, Outlook, Word, PowerPoint and Office Tab Pro. Click to download now!

  • One-click convenience: Download all five setup packages in a single action.
  • 🚀 Ready for any Office task: Install the add-ins you need, when you need them.
  • 🧰 Included: Kutools for Excel / Kutools for Outlook / Kutools for Word / Office Tab Pro / Kutools for PowerPoint