After you add filters to the view of an Outlook folder, if you would like to copy the view filters from this folder to another, you can use the way introduced in this post.
Outlook supports you to apply filters to folder views. For example, you can set a folder to only show today’s emails by adding a view filter. Now, if you have set up some filters in a folder’s view and hope to copy the filters to the other folders, you can use the following method. It can let you accomplish this in quick time without needs to create filters manually.
Copy View Filters from One Outlook Folder to Another
- At the very beginning, press “Alt + F11” to access VBA editor in Outlook.
- Then, copy and paste the following code into an unused module.
Sub CopyViewFiltersFromOneFolderToAnother() Dim objCurrentFolder As Outlook.Folder Dim objCurrentView As Outlook.View Dim strViewFilter As String Dim objTargetFolder As Outlook.Folder Dim objTargetFolderView As Outlook.View 'Get the opened folder's view filters Set objCurrentFolder = Application.ActiveExplorer.CurrentFolder Set objCurrentView = objCurrentFolder.CurrentView strViewFilter = objCurrentView.Filter If strViewFilter <> "" Then 'Select the target folder Set objTargetFolder = Outlook.Session.PickFolder If Not (objTargetFolder Is Nothing) Then If objTargetFolder.DefaultItemType = objCurrentFolder.DefaultItemType Then 'Copy the view filters from source folder to the target Set objTargetFolderView = objTargetFolder.CurrentView objTargetFolderView.Filter = strViewFilter objTargetFolderView.Save objTargetFolderView.Apply MsgBox "Complete!", vbInformation + vbOKOnly Else MsgBox "You should select a folder in the same type as the current one!", vbExclamation + vbOKOnly End If Else MsgBox "You should select a folder!", vbExclamation + vbOKOnly End If Else MsgBox "There is not view filter in the current folder!", vbExclamation + vbOKOnly End If End Sub
- Next, exit the VBA editor.
- After that, follow the “Optional Step” in the article – “How to Run VBA Code in Your Outlook” to add this macro to Quick Access Toolbar.
- Finally, you can have a try right now.
- First off, in folder list, select the folder whose view filters will be copied.
- Then, click the macro button in the Quick Access Toolbar.
- In the subsequent dialog box, select the target folder which you copy the view filters to.
Note: You should select a destination folder in the same type as the source folder.
- After that, click “OK”.
- At once, the view filters will be copied and applied to the target folder.
Encounter Disturbing Outlook Troubles
In Outlook, you may be subject to miscellaneous issues, including its sudden not responding, serious virus infection as well as inaccessible PST file, etc. In face of different problems, you need take different actions. For instance, in terms of PST damage, you can try inbox repair tool to fix file in the first place. If it doesn’t work, you can continue attempting other means to recover Outlook data, such as using an external tool like DataNumen Outlook Repair.
Shirley Zhang is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including corrupt sql and outlook repair software products. For more information visit www.datanumen.com