Aussie
Member
- Outlook version
- Outlook 2010 32 bit
- Email Account
- Exchange Server 2010
Hi all. I am looking for an idea/direction on how to correct a bug in my Outlook rule operation. The rule operation is intermittent … but usually fails nowadays. The rule has been running reliably for years.
I run a rule after messages arrive, that checks the subject, and if it matches, the rule 1) sets the email to high importance and 2) then runs a script to set a reminder for tomorrow. When the email arrives, watching the inbox, I see the reminder “bell” appear on the email in the inbox, and then a few seconds after the rule completes the reminder clears and the importance set to high.
So ... I added a “MsgBox "A new bill has arrived!"” to the bottom of the script (as a debug break-point) and the script does indeed run and set the reminder (as seen in the inbox). As soon as I acknowledge the “Hello World” MsgBox, the reminder on the email clears.
Monitoring the email as it arrives (see the attached picture) shows 1) the break-point, 2) the reminder correctly set (top email), and 3) the reminder cleared (on the previously delivered second and third emails) with the importance marked.
I am looking for a suggestion(s) as to 1) what is causing this or 2) what a good debug path might be (given the background below).
Background
I am running Windows 10, Office 365 with all updates applied. Outlook is running in cached mode.
I have run “outlook.exe /cleanrules”.
I am running a single newly written rule to test (no other rules are present).
A “Hello World” macro runs … so macros are authorized to run.
The rules were running a week ago, and then started to fail.
Using a debug test point shows that the rule and the script runs, but the reminder is “overwritten” or “reset”.
Here is the script … I do write simple scripts, but I am far from a script jockey.
Sub PendingPaid(Item As Outlook.MailItem)
'
' This macro is run as a script from an Outlook Rule.
' When a message arrives, the rule activates the script.
' The script will set a category and reminder
'
Item.Categories = "Bill"
' Item.Subject = Item.Subject & " - Pending - PAID - yy??"
Item.Subject = Item.Subject & " " & Chr(150) & " Pending " & Chr(150) & " PAID " & Chr(150) & " 201??"
Item.ReminderSet = True
Item.FlagDueBy = Date + 1 & Space(1) & "8:45 AM" ' Remind 1 day from now.
Item.ReminderTime = Date + 1 & Space(1) & "8:45 AM" ' Remind 1 day from now.
Item.Save
'
' Test debug break-point
MsgBox "Hello world!"
'
End Sub
I run a rule after messages arrive, that checks the subject, and if it matches, the rule 1) sets the email to high importance and 2) then runs a script to set a reminder for tomorrow. When the email arrives, watching the inbox, I see the reminder “bell” appear on the email in the inbox, and then a few seconds after the rule completes the reminder clears and the importance set to high.
So ... I added a “MsgBox "A new bill has arrived!"” to the bottom of the script (as a debug break-point) and the script does indeed run and set the reminder (as seen in the inbox). As soon as I acknowledge the “Hello World” MsgBox, the reminder on the email clears.
Monitoring the email as it arrives (see the attached picture) shows 1) the break-point, 2) the reminder correctly set (top email), and 3) the reminder cleared (on the previously delivered second and third emails) with the importance marked.
I am looking for a suggestion(s) as to 1) what is causing this or 2) what a good debug path might be (given the background below).
Background
I am running Windows 10, Office 365 with all updates applied. Outlook is running in cached mode.
I have run “outlook.exe /cleanrules”.
I am running a single newly written rule to test (no other rules are present).
A “Hello World” macro runs … so macros are authorized to run.
The rules were running a week ago, and then started to fail.
Using a debug test point shows that the rule and the script runs, but the reminder is “overwritten” or “reset”.
Here is the script … I do write simple scripts, but I am far from a script jockey.
Sub PendingPaid(Item As Outlook.MailItem)
'
' This macro is run as a script from an Outlook Rule.
' When a message arrives, the rule activates the script.
' The script will set a category and reminder
'
Item.Categories = "Bill"
' Item.Subject = Item.Subject & " - Pending - PAID - yy??"
Item.Subject = Item.Subject & " " & Chr(150) & " Pending " & Chr(150) & " PAID " & Chr(150) & " 201??"
Item.ReminderSet = True
Item.FlagDueBy = Date + 1 & Space(1) & "8:45 AM" ' Remind 1 day from now.
Item.ReminderTime = Date + 1 & Space(1) & "8:45 AM" ' Remind 1 day from now.
Item.Save
'
' Test debug break-point
MsgBox "Hello world!"
'
End Sub