2 Effective Methods to Batch Delete All Outlook Rules Performing a Specific Action

If you need to batch delete all Outlook rules that perform a specific action, such as “Move”, “Copy” or “Flag”, you can read this article. Here we will take “Move” action as an example to introduce you 2 quick methods.

At times, you may want to delete all rules performing a specific action in Outlook. For instance, you’ve rebuilt folder structures in your mailboxes. Thus, you intend to re-classify and archive emails to different folders. In this case, you may want to batch delete all rules performing the “Move” action. Looking at this, here we will introduce 2 ways. The first one is appropriate to one mailbox. But if you want to process all mailboxes in your Outlook, you’d better use the following Method 2.

Method 1: Batch Delete in One Mailbox

  1. To begin with, click “File”.
  2. Then, in the “File” menu, click “Manage Rules & Alerts” button.
  3. In the next “Rules and Alerts” dialog box, you can see the “Actions” column in rule list. And the icon of “Move” action is "Move" Action.Rule Action Icons
  4. Now, press “Ctrl” key and meanwhile select the rules whose action icon is "Move" Action one by one.
  5. After selecting rules, click “Delete” button above the rule list.Batch Delete Selected Rules

Method 2: Batch Delete in All Mailboxes

  1. For a start, launch Outlook VBA editor according to “How to Run VBA Code in Your Outlook“.
  2. Next, copy the following VBA code into a blank module.
Sub DeleteAllMoveRules()
    Dim objStores As Outlook.Stores
    Dim objStore As Outlook.Store
    Dim objRules As Outlook.rules
    Dim i As Long
    Dim objRule As Outlook.Rule
    Dim objRuleAction, objMoveRuleAction As Outlook.RuleAction
 
    Set objStores = Outlook.Application.Session.Stores
 
    'Process all mailboxes
    For Each objStore In objStores
        Set objRules = objStore.GetRules
 
        For i = objRules.Count To 1 Step -1
            Set objRule = objRules(i)
            For Each objRuleAction In objRule.Actions
                'If "Move" action is enabled
                If objRuleAction.ActionType = olRuleActionMoveToFolder Then
                   Set objMoveRuleAction = objRuleAction
                   If objMoveRuleAction.Enabled = True Then
                      'Delete the rule
                      objRules.Remove (objRule.Name)
                      On Error Resume Next
                      objRules.Save
                      Exit For
                   End If
                 End If
            Next
       Next i
    Next
End Sub

VBA Code - Batch Delete All Outlook Rules Performing "Move" Action

  1. Subsequently, press “F5” key to run this macro right now.
  2. When macro completes, check the rules of every mailbox in your Outlook. All the rules related to “Move” action are gone.Rules Performing "Move" Action Have Been Gone

Do with Worrying Outlook Errors

Do you receive any error messages during using your Outlook? In reality, Outlook is prone to error and even corruption. Hence, it is common to encounter Outlook errors. Fortunately, Outlook provides the inbuilt fix tool – Scanpst. You can use it to try fixing errors. If it fails, your last resort is a more skillful and potent external tool, like DataNumen Outlook Repair.

Author Introduction:

Shirley Zhang is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including recover sql and outlook repair software products. For more information visit www.datanumen.com

Comments are closed.