How to root mails to particular folder in outlook
Rooting emails to a particular folder in Outlook can be done in a few ways. Here are a few methods:
Method 1: Using Rules
- Open Outlook and go to the "Home" tab in the ribbon.
- Click on the "Rules" button in the "Move" group.
- Click on "Manage Rules & Alerts" in the drop-down menu.
- Click on "New Rule" and select "Start from a blank rule".
- Choose "Move messages from someone to a folder" and click "Next".
- Enter the sender's email address or a specific phrase in the "From" field.
- Select the folder you want to root the emails to and click "Next".
- Name the rule and click "Finish".
Method 2: Using Search Folders
- Open Outlook and go to the "Folder" tab in the ribbon.
- Click on "New Search Folder" and select "Custom".
- In the "Search Folder" dialog box, enter the search criteria (e.g. sender's email address or a specific phrase).
- Click "OK" to create the search folder.
- Right-click on the search folder and select "Copy to Folder".
- Select the folder you want to root the emails to and click "OK".
Method 3: Using VBA Macro
-
Open Outlook and go to the "Developer" tab in the ribbon.
-
Click on "Visual Basic" to open the Visual Basic Editor.
-
In the Editor, insert a new module by clicking "Insert" > "Module".
-
Paste the following code:
Sub RootEmailsToFolder() Dim olApp As New Outlook.Application Dim olNamespace As Outlook.Namespace Dim olFolder As MAPIFolder Dim olSearch As Search Dim olItems As Items Set olApp = New Outlook.Application Set olNamespace = olApp.GetNamespace("MAPI") Set olFolder = olNamespace.GetDefaultFolder(olFolderInbox) Set olSearch = olFolder.Folders("Search Folders").Find("Your Search Folder Name") Set olItems = olSearch.Items For Each olItem In olItems olItem.Move olFolder Next olItem Set olItems = Nothing Set olSearch = Nothing Set olFolder = Nothing Set olNamespace = Nothing Set olApp = Nothing End Sub
-
Replace "Your Search Folder Name" with the name of your search folder.
-
Save the module by clicking "File" > "Save" (or press Ctrl+S).
-
Close the Visual Basic Editor.
-
Go back to Outlook and click on the "Developer" tab in the ribbon.
-
Click on "Macros" and select "Run" next to the "RootEmailsToFolder" macro.
Note: Make sure to adjust the code to match your specific requirements and Outlook version.