Rules Run a Script on an Incoming Email OK and then the Email reverts

Status
Not open for further replies.

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

Outlook_2010_Set Reminder_Message_Scripts_201027.PNG
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
J Outlook Rules VBA Run a Script - Multiple Rules Outlook VBA and Custom Forms 0
N Outlook 2021 'Run Script" Rules? Outlook VBA and Custom Forms 4
oliv- How to Run a Script IN AN ADDIN with Outlook's Rules and Alerts Outlook VBA and Custom Forms 2
Xueying run a script in rules, first time succeed, failed afterwards Outlook VBA and Custom Forms 3
P Vba script including macro appears in rules but wont run Outlook VBA and Custom Forms 6
J Outlook 2007 Rules & VBA: How to run a script on a report message (ReportItem) Using Outlook 14
L Run A Script not listed in rules wizard Outlook VBA and Custom Forms 12
A Apply Selected Emails to outlook rules and Run Rules Using Outlook 5
O Having rules run on old mails noved to inbox Outlook VBA and Custom Forms 8
J Run Rules Now Using Outlook 1
H 2013 Rules do not run automaticlly on SENT mail Using Outlook 3
M Run rules after mail is 24 hours old Using Outlook 1
T Rules to run manually and NOT automatically ? Using Outlook 0
K Run rules Outlook VBA and Custom Forms 1
K Macro to Run Rules Outlook VBA and Custom Forms 5
R How to simplify rules Using Outlook 2
J Recover server side rules from OST/PST without access to the server Using Outlook 2
K Multiple Rules on Single Email Using Outlook 2
R rules not working - done troubleshooting Using Outlook 0
P Outlook 2013 All imported Mail Rules in error when imported into new profile Using Outlook 5
Wayne Outlook locks up when opening "Manage Rules & Alerts" Using Outlook 7
T "Words In Recipient's Address" Rule Causes Outlook To Stop Processing Rules Using Outlook 3
Retired Geek Junk Folder Clean Up Rules Exchange Server Administration 1
B Setting rules Using Outlook 1
A rules not working Using Outlook 2
M Rules and autoreply Using Outlook 1
N Outlook rules don't create a copy for bcc'ed emails Using Outlook 3
O How to recover rules after switch from POP3 to IMAP Using Outlook 2
N Focussed Inbox Rules Failing Using Outlook 5
N Copies of emails from rules have wrong from: account Using Outlook 0
L Office 365 cloud based rules Using Outlook 1
K Outlook Rules: Move a Copy Using Outlook 4
CWM030 Rules disappearing in OL 2016? ( Yes, I searched before posting) Using Outlook 7
R When rules lose track of "specified folder" Using Outlook 6
I Outlook 2013 Rules - (client only) Using Outlook.com accounts in Outlook 1
B When I add more search strings to RULES, it is not processing them Using Outlook 3
A rules (flags) not working Using Outlook 7
K Lost Rules. Assistant accesses my mailbox. Disappeared Using Outlook 0
soadfan Outlook rules look up display name only Using Outlook 4
S Send email via SMTP - use transport rules to add to senders inbox (then rule to move to sent items Exchange Server Administration 1
Justo Horrillo Issue with rules in Outlook 2010 Using Outlook 4
J Outlook Rules - Changing auto-submit address in multiple rules, according to rule name Outlook VBA and Custom Forms 0
R When rules are working but invisible and unmanageable Using Outlook 2
P Transport Agent or Rules/Connectors Exchange Server Administration 1
A Rules - how to determine if all conditions in rule are true or false Outlook VBA and Custom Forms 5
E Outlook 2010 need help with rules Using Outlook 0
O Rules and Alerts for New Messages BEFORE sending Using Outlook 2
D Outlook Rules Using Outlook 1
Diane Poremsky Autoaccept a Meeting Request using Rules Using Outlook 2
K adding more rules to 'different domains check' macro Outlook VBA and Custom Forms 2

Similar threads

Back
Top