How can i make a rule that runs all rules on inbox automatically preferably, or at least manually, after a bunch of new messages from another account were just pushed to it? I'll even do a batch into task scheduler if i have to. I'm desperate, so i'm willing to take a few steps.

So more specifically, I have some rules that take an outlook IMAP Gmail account, and on this computer only move it to the folder which goes to a PST inbox that is my master inbox. That's the only rule for that IMAP account. I now need all those extended rules, which are normally made for POP messages incoming fresh to the inbox normally, to process on them.

So how can i trigger all the rules to process on these fresh IMAP moves after that move is done? The rules are not sensing the move, since they are not fresh incoming messages (forwarding is out of the question, that messed up all rules as it is)

I think the least hops way is to just have it the way i do for the IMAP , which is in settings to 'not make a copy on the server' and to 'purge' after, then the sole IMAP account rule comes in play here on this computer only... move to master inbox, as mentioned above. The problem comes after this, they stay in the master inbox, unprocessed.

Now i want them to auto-process(as if i manually went into outlook rules, ran all rules, select all, run on inbox only)

  • mind you, if your hotkey and utility scenario sucks, im definitely going with the outlook rule scenario, especially if it works. I need something automated preferably, that can be added to the ruleset, or on a utility timer maybe?? (im on win7) – Brian Thomas Feb 7 '17 at 21:11
  • So far, i click on the rules manage button, which in intself is two clicks, then i hold the alt key down, then press the following sequence (alt +r-e-o-c-f4) this runs then closes. But, how do i open the rules button itself, to expose the dropdown elements which do have hotkeys. Does this have a hotkey? – Brian Thomas Feb 9 '17 at 22:27

This VBA macro should do the job :

Sub RunAllInboxRules()
    Dim st As Outlook.Store
    Dim myRules As Outlook.Rules
    Dim rl As Outlook.Rule
    Dim count As Integer
    Dim ruleList As String
    'On Error Resume Next

    ' get default store (where rules live)
    Set st = Application.Session.DefaultStore
    ' get rules
    Set myRules = st.GetRules

    ' iterate all the rules
    For Each rl In myRules
        ' determine if it's an Inbox rule
              If rl.RuleType = olRuleReceive And rl.IsLocalRule = True Then
            ' if so, run it
            rl.Execute ShowProgress:=True
            count = count + 1
            ruleList = ruleList & vbCrLf & rl.Name
        End If

    ' tell the user what you did
    ruleList = "These rules were executed against the Inbox: " & vbCrLf & ruleList
    MsgBox ruleList, vbInformation, "Macro: RunAllInboxRules"

    Set rl = Nothing
    Set st = Nothing
    Set myRules = Nothing
End Sub

A macro can be added as a button, as described below.

References :

|improve this answer|||||
  • Waiting for more answers before i send out award. I am not even sure what the VBA macro is, because im usually anti vb anything.. Ill look into it, but i like the fact that it can be added as a button. – Brian Thomas Feb 9 '17 at 22:22

I found a good hot key combo that works that runs "all rules on inbox"


After selecting the inbox, or the box you want to run the rule on,

1) Hold the alt key down

2) Issue the following sequence, being careful to pause after the running part(the o) until it finishes h r r l gets the rules open, then r e o to run them, then when its done running rules, still holding the alt c then f4 to close the rules.

I know this can be bash scripted, anybody have any good examples?

Hotkey Combo

Ends up being like this (holding down alt the entire time)

alt + hrrl reo c f4

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.