0

My Outlook rules regulate moving the emails to folders and notifying me about some of them. Thus I have to rely on rules, which are client-only.

However, I often see the delay between receiving the message into the Inbox folder and it being moved to the folder, which is specified in a client-only rule.

How can I increase the frequency of rules running? Ideally, I would like to run client-only rules as soon as new message arrives. Outlook Version 2005 (Build 12827.20336 Click-to-Run)

UPD: An example of one of my rules:

Apply this rule after the message arrives
with example.com in the recipient's address
move it to Example folder
  and Display a Desktop Alert
  and stop processing more rules

2 Answers2

0

As Zina mentioned above, the outlook rule will be applied every time your Outlook receives a message when you set Apply this rule after the message arrives. Please check the status of all your rules and see if they have been all enabled properly.

Jeff Yang7
  • 1,430
0

I was able to solve this problem via enabling Visual Basic, and running the rules using the Application_NewMail event. This made the rules really run after every mail reception operation.

For the instruction, how to enable Visual Basic for your Outlook, please, see this superuser answer or this illustrated instruction.

In Visual Basic Editor in Outlook add a Module and paste this code:

Sub RunRules(ColRules As Object)
Dim myRule As Outlook.rule      

For Each myRule In ColRules
    ' Rules we want to run
    myRule.Execute ShowProgress:=False
    Debug.Print myRule.name

    ' Actually, this is strange, because it processess every item, so should stop on the first rule, which has such condition
    Dim oAction As Outlook.RuleAction
    For Each oAction In myRule.Actions
        If oAction.Enabled = True Then
            If oAction.ActionType = olRuleActionStop Then
                Exit For
            End If

            'add more actions here
        End If
    Next

Next
Exit Sub

End Sub

Public Sub RunAllRules()

Dim ColRules As Outlook.Rules Dim ErrDesc As String Dim ErrNum As Long Dim InxStoreCrnt As Long Dim RuleCrnt As Outlook.rule

With Session For InxStoreCrnt = 1 To .Stores.Count With .Stores(InxStoreCrnt) Debug.Print .DisplayName Set ColRules = Nothing On Error Resume Next Set ColRules = .GetRules() ErrNum = Err.Number ErrDesc = Err.Description On Error GoTo 0 If ErrNum <> 0 Then Debug.Print " " & ErrNum & " " & ErrDesc Else If Not ColRules Is Nothing Then If ColRules.Count = 0 Then Debug.Print " no rules in this store" Else Call RunRules(ColRules) End If Else Debug.Print " No error but GetRules returned Nothing" End If End If End With Set ColRules = Nothing Next End With

End Sub

Then paste the following into your Microsoft Outlook ObjectsThisOutlookSession:

Private Sub Application_NewMail()
    RunAllRules
End Sub