Skip to main content

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

How to find folder by name in Outlook?

Author Siluvia Last modified

For example, you have created many email folders in Outlook, when a specified personal folder need to be opened, you have to expand multiple folders until that specified folder shows up. It is troublesome to expand multiple folders one by one just for opening a specified personal folder. Actually, if you remember the folder name, all things will become easily. In this tutorial, we will provide you with a method of finding folder by its name in Outlook instead of expanding folders one by one to find the folder.

Find folder by name in Outlook with VBA code

Search folder by name across accounts in Outlook by Kutools for Outlookgood idea3


Find folder by name in Outlook with VBA code

With following VBA code, you can easily find a specified folder by its name.

Note: You need to remember the folder name in order to use this VBA code.

1. Press the Alt + F11 keys on the keyboard to open the Microsoft Visual Basic for Applications window.

2. Then double click the Project1 > Microsoft Outlook Object > ThisOutlookSession to open the Project1 – ThisOutlookSession window. See screenshot:

the screenshot of step about finding folder by name in Outlook with VBA code

3. Copy and paste the following VBA code into the Project1 – ThisOutlookSession window.

VBA: find folder by name

Sub FindFolderByName()
    Dim Name As String
    Dim FoundFolder As Folder
    
    Name = InputBox("Find Name:", "Search Folder")
    If Len(Trim$(Name)) = 0 Then Exit Sub
    
    Set FoundFouder = FindInFolders(Application.Session.Folders, Name)
    
  If Not FoundFouder Is Nothing Then
    If MsgBox("Activate Folder: " & vbCrLf & FoundFouder.FolderPath, vbQuestion Or vbYesNo) = vbYes Then
      Set Application.ActiveExplorer.CurrentFolder = FoundFouder
    End If
  Else
    MsgBox "Not Found", vbInformation
  End If
End Sub
Function FindInFolders(TheFolders As Outlook.Folders, Name As String)
  Dim SubFolder As Outlook.MAPIFolder
  
  On Error Resume Next
  
  Set FindInFolders = Nothing
  
  For Each SubFolder In TheFolders
    If LCase(SubFolder.Name) Like LCase(Name) Then
      Set FindInFolders = SubFolder
      Exit For
    Else
      Set FindInFolders = FindInFolders(SubFolder.Folders, Name)
      If Not FindInFolders Is Nothing Then Exit For
    End If
  Next
End Function 

4. Then press F5 key on the keyboard to run the VBA code.

5. In the Macros dialog box, click the Run button.

the screenshot of step 2 about finding folder by name in Outlook with VBA code

6. In the popping up Search Folder dialog box, please type the folder name in the text box, then click the OK button. See screenshot:

the screenshot of step 3 about finding folder by name in Outlook with VBA code

7. Then a Microsoft Outlook dialog box pops up, it shows the path of your desired folder, and then click the Yes button.

the screenshot of step 4 about finding folder by name in Outlook with VBA code

8. Then the specified email folder will be opened immediately.

Note: This VBA code can be applied to Outlook 2007, 2010 and 2013.


Search folder by name across accounts in Outlook by Kutools for Outlook

If you are not good at VBA, you can try Kutools for Outlook's Go To utility, which can find and search folder with name or specific character, then directly go to the folder

 👉 Kutools for Outlook has a free version now, whose 70+ features are free for a lifetime. Download the Free Version Now.

Free install Kutools for Outlook, and then do as below steps:

1. Click Kutools Plus > Folder > Go To.

doc find folder by name 5

2. In the Go To dialog, type the folder name or specific characters in the search bar, then the relative folders are list.

doc find folder by name 6

3. Double click at the folder name you want to go to and open, then the folder is open.

doc find folder by name 7
 

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