Skip to main content

How to create a folder to organize emails containing specific people in Outlook?

Overwhelmed by a cluttered inbox? In this tutorial, I will introduce three methods to organize emails containing specific people in Outlook for better efficiency.


Always move emails containing certain people to a created folder

1. Right-click on the email account for which you will create a folder to organize emails, select New folder from the right-clicking menu, and name the folder.

2. In your Inbox or Sent Items folder, select any one of the email messages containing specific email address that you will move all his/her emails to the created folder.

3. On the Home tab, in the Move group, click on Rules > Always Move Messages From: specific email address and/or Rules > Always Move Messages To: specific email address according to your needs.

4. In the pop-up Rules and Alerts dialog box, specify the folder that you will move the messages to, and then click OK.

5. The emails in the Inbox or Sent Items folder that meet the conditions are now moved to the folder you just created. And the future email messages will also go to the folder directly if they meet the conditions.


Create a search folder to automatically organize emails for specific people

If you do not want to move the messages to a folder, but just want to view them easily. You can create a search folder in Outlook, which enables you to find email messages matching specified criteria across multiple folders, but keep them in their original folders.

1. On the Folder tab, in the New group, click on New Search Folder.

2. In the pop-up New Search Folder dialog, please do as follows:
  • 1) In the Select a Search Folder box, in the Mail from People and Lists list, select Mail from and to specific people, or Mail from Specific People as you need.
  • 2) In the Customize Search Folder box, click on Choose to select people from your address list.
  • 3) Specify the email account from where to search emails.
  • 4) Click OK.

3. A search folder is created under Search Folders, containing the email messages that meet the conditions.


Batch create folders to organize emails for all your email accounts with VBA

If you have multiple email accounts in Outlook, and want to create folders for each email account in batches for specific people, you can use the VBA method to move the messages containing specific people from the Inboxes or Sent folders of your email accounts. Please do as follows.

1. In your Outlook, click File > Options > Trust Center, and then click on Trust Center Settings.

2. In the pop-up dialog, switch to Macro Settings, select Enable all macros, and check Apply macro security settings to installed add-ins.

3. Click OK buttons to close the dialogs.

4. Press the Alt + F11 keys to open the Microsoft Visual Basic for Applications window.

5. Click Insert > Module. Then copy either of the following VBA codes to the Module window.

VBA code 1: Batch create folders to organize emails containing specific senders across Inboxes of all email accounts

Sub MailArchiveSenderInInbox()
'Update by ExtendOffice
Dim I As Integer
Dim xAccount As Account
Dim xItem As Object
Dim xMail As MailItem
Dim xNewFolder As Folder
Dim xInboxFolder As Folder
Dim xSenderAddress As String
Dim xRecipient As Recipient
Dim xFolderName As String
xFolderName = "NewFolder" 'Replace "NewFolder" with desired folder name
Const PR_SMTP_ADDRESS = "http://schemas.microsoft.com/mapi/proptag/0x39FE001E"
On Error Resume Next
For Each xAccount In Application.Session.Accounts
  Set xInboxFolder = xAccount.DeliveryStore.GetDefaultFolder(olFolderInbox) 'Replace "olFolderInbox" with "olFolderSentMail" if you want to find messages in Sent folders
  Set xNewFolder = Nothing
  Set xNewFolder = xAccount.DeliveryStore.GetRootFolder.Folders(xFolderName)
  If xNewFolder Is Nothing Then
    Set xNewFolder = xAccount.DeliveryStore.GetRootFolder.Folders.Add(xFolderName)
  End If
  For I = xInboxFolder.Items.Count To 1 Step -1
    Set xItem = xInboxFolder.Items.Item(I)
    If xItem.Class = olMail Then
      Set xMail = xItem
      xSenderAddress = ""
      If xMail.Sender.Type = "EX" Then
        xSenderAddress = xMail.Sender.PropertyAccessor.GetProperty(PR_SMTP_ADDRESS)
      Else
        xSenderAddress = xMail.SenderEmailAddress
      End If
      If xSenderAddress = "" Then
        xSenderAddress = xMail.SenderEmailAddress
      End If
      If VBA.InStr(xSenderAddress, "") <> 0 Then 'Replace the email address in double quotes
        xMail.Move xNewFolder
      End If
    End If
  Next
  If xNewFolder.Items.Count = 0 Then
    xNewFolder.Delete
    xAccount.DeliveryStore.GetDefaultFolder(olFolderDeletedItems).Folders(xFolderName).Delete
  End If
Next
Set xInboxFolder = Nothing
Set xNewFolder = Nothing
End Sub

Note: You should replace specific snippets according to the comments in the 12th, 16th, and 35th rows of the VBA code above.

VBA code 2: Batch create folders to organize emails containing specific recipients across Inboxes of all email accounts

Sub MailArchiveRecipientInInbox()
'Update by ExtendOffice
Dim I As Integer
Dim xAccount As Account
Dim xItem As Object
Dim xMail As MailItem
Dim xNewFolder As Folder
Dim xInboxFolder As Folder
Dim xSenderAddress As String
Dim xRecipient As Recipient
Dim xFolderName As String
xFolderName = "NewFolder" 'Replace "NewFolder" with desired folder name
Const PR_SMTP_ADDRESS = "http://schemas.microsoft.com/mapi/proptag/0x39FE001E"
On Error Resume Next
For Each xAccount In Application.Session.Accounts
  Set xInboxFolder = xAccount.DeliveryStore.GetDefaultFolder(olFolderSentMail) 'Replace "olFolderInbox" with "olFolderSentMail" if you want to find messages in Sent folders
  Set xNewFolder = Nothing
  Set xNewFolder = xAccount.DeliveryStore.GetRootFolder.Folders(xFolderName)
  If xNewFolder Is Nothing Then
    Set xNewFolder = xAccount.DeliveryStore.GetRootFolder.Folders.Add(xFolderName)
  End If
  For I = xInboxFolder.Items.Count To 1 Step -1
    Set xItem = xInboxFolder.Items.Item(I)
    If xItem.Class = olMail Then
      Set xMail = xItem
      xSenderAddress = ""
      For Each xRecipient In xMail.Recipients
'        If xRecipient.Type = olCC Then   'To find CC recipients. Replace "olCC" with "olBCC" to find BCC recipients
            xSenderAddress = xSenderAddress & ", " & xRecipient.PropertyAccessor.GetProperty(PR_SMTP_ADDRESS)
            If xSenderAddress = "" Then
              xSenderAddress = xSenderAddress & ", " & xRecipient.Address
            End If
'        End If
      Next
      If VBA.InStr(xSenderAddress, "") <> 0 Then 'Replace the email address in double quotes
        xMail.Move xNewFolder
      End If
    End If
  Next
  If xNewFolder.Items.Count = 0 Then
    xNewFolder.Delete
    xAccount.DeliveryStore.GetDefaultFolder(olFolderDeletedItems).Folders(xFolderName).Delete
  End If
Next
Set xInboxFolder = Nothing
Set xNewFolder = Nothing
End Sub

Note:

  • 1) You should replace specific snippets according to the comments in the 12th, 16th, and 35th rows of the VBA code above.
  • 2) To archive messages containing specific CC or BCC recipient, uncomment the 28th and 33th rows by deleting the apostrophe (β€˜) at the beginning of the rows.

6. Press F5 to run the VBA code. And new folders will be created if there are messages meet the conditions.

Note: The VBA method works for existing email messages. If there are new messages from/ to the specific person that you want to archive, please repeat the step 4-6.

Related articles

How To Create A Search Folder Across Multiple Outlook Data Files/Pst/Email Accounts?

As you know, a search folder can only search emails in the scope of current mailbox in Outlook. However, Outlook can search across all mailboxes with the Instant Search feature. Therefore, you can try below workaround to create a search folder across multiple emails accounts in Outlook.

How To Create A Search Folder For Internal Emails In Outlook?

It’s not hard to create a search folder by a specified sender or sender domain in normal POP3 email accounts in Outlook. However, the same way does not work for exchange account. In this article, I will show you how to create a search folder to show all emails from internal senders within exchange account.

How To Group Email Messages By Specified Color Categories In Outlook?

Sometimes, you mark email messages with specified color categories, and then you can rule or find out these email messages easily, or for other purposes. When a mass of email messages crowd in a mail folder, it is hard to find out the email messages marked by specified color categories at a glance. Actually, there are a couple of tricks to group email messages by specified color categories in Microsoft Outlook quickly.

How To Create A Folder To Organize Emails By Date Range In Outlook?

In this tutorial, I will introduce two methods to organize emails by date range with folders in Outlook for better efficiency.


Best Office Productivity Tools

Kutools for Outlook - Over 100 Powerful Features to Supercharge Your Outlook

πŸ€– AI Mail Assistant: Instant pro emails with AI magic--one-click to genius replies, perfect tone, multilingual mastery. Transform emailing effortlessly! ...

πŸ“§ Email Automation: Out of Office (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: Easily 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   /  Boost Your Outlook Productivity with Tabbed Views  /  Minimize Outlook Instead of Closing ...

πŸ‘ One-click Wonders: Reply All with Incoming 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 ...

Over 100 Features Await Your Exploration! Click Here to Discover More.

Read More       Free Download      Purchase
 

 

Comments (0)
No ratings yet. Be the first to rate!
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
Rate this post:
0   Characters
Suggested Locations