Run Script rule not running for newly arriving messages

Status
Not open for further replies.
in all fairness, a very small % of users use scripts and if the condition looks for words in the body, it should work - its just things that use the initial header that should cause issues.
 
But, Diane, my very own example shows that "looks for words in the body" doesn't work unless you take explicit steps to make sure that the asynchronous population of the MailItem members by Outlook has been given sufficient time to populate .Body before you test anything using it.

The entire crux of the script not working appears to be secondary to the script being handed a MailItem that "isn't done being populated yet." Whether or not what I'm doing is common or not, what is being passed is not something that any reasonable programmer would expect that they were getting. Objects should be an "all or nothing" deal, with anything that can be populated actually being populated, and the remainder having been initialized to NULL, before they are ever passed along for downstream processing.

Even my tests for IsNull on a .Body that contained, literally, nothing was failing. From what I can find of the "Is Nothing" test that would apply to an object as a whole. not to members.

In any case, a solution has been identified, which leaves my blind client in a much better position to snag a translating gig when the offers arrive. Trying to manually activate the link in the message with a screen reader takes much longer than it does for those of us who have sight to "point and click" and the gigs he competes for are very much "response time is of the essence."
 
in all fairness, a very small % of users use scripts and if the condition looks for words in the body, it should work - its just things that use the initial header that should cause issues.
 
Diane,

The following is an SOS call!!

I know that one of your posts on slipstick covers how to turn on the VBA regular expression processing library, and you directed me to that a while back, but I cannot for the life of me find the page via search or my own web history. Would you mind directing me there again?

Thanks,
Brian
 
In the VBA Editor, Tools, References - It's under Microsoft VBScript Regular Expressions 5.5 i think - (The 5.5 part is definitely correct :))
 
Thanks so very much. I'm going to paste the step-by-step instructions I just put together for my client in case anyone needs to do this. It's written with a focus on keyboard shortcuts since he's blind and cannot use the mouse, but anyone who can see will easily be able to determine the "point and click" equivalents:

Once Outlook is open, and you have focus on the inbox on which the rule is supposed to run:

1. Hit ALT+F11 to open the VBA Editor.

2. Hit ALT+T,R to open the Tools menu, References Dialog

3. Once the References Dialog is open, search for the checkbox for "Microsoft VBScript Regular Expressions 5.5" and check it. (If the 5.5 has been changed, don't worry, whatever version of Microsoft VBScript Regular Expressions that shows up should have the checkbox checked).

4. Hit the OK button on the References Dialog to close it.

5. Hit ALT+F,C to close the VBA editor.


Brian, who didn't know whether the 5.5 would still be carried over to Outlook 2016, but it's absolutely there for Outlook 2010
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
K Run a script rule to auto 'send again' on undeliverable emails? Outlook VBA and Custom Forms 1
G Save attachment run a script rule Outlook VBA and Custom Forms 0
E Having some trouble with a run-a-script rule (moving mail based on file type) Outlook VBA and Custom Forms 5
B Outlook rule run a Script doesn't work Outlook VBA and Custom Forms 1
Vijay Error in rule- Run a script Using Outlook 1
Diane Poremsky Run a Script Rule: Send a New Message when a Message Arrives Using Outlook 2
L Run a Script Rule doesn't work Using Outlook 5
L Cannot run script from rule Outlook VBA and Custom Forms 7
O modify vba to run it as script rule Outlook VBA and Custom Forms 8
Jeff Rott Diane Question on "Use in a Run a Script Rule" Outlook VBA and Custom Forms 1
L Run script rule not exectued for first few mails Outlook VBA and Custom Forms 2
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
Aussie Rules Run a Script on an Incoming Email OK and then the Email reverts Outlook VBA and Custom Forms 0
Y Outlook 2013 Run A Script Outlook VBA and Custom Forms 4
B Wanting to run a script that will filter any body that has a russian link in it. Outlook VBA and Custom Forms 5
Bri the Tech Guy Registry Tweak to make "Run a Script" Action Available Outlook VBA and Custom Forms 2
Vijay Run script doesn't work in outlook Using Outlook 1
oliv- How to Run a Script IN AN ADDIN with Outlook's Rules and Alerts Outlook VBA and Custom Forms 2
X Outlook script to run excel data Outlook VBA and Custom Forms 1
D RUN SCRIPT WHEN OUTLOOK IS CLOSE Outlook VBA and Custom Forms 1
P How many subs can run in one outlook VBA script Using Outlook 5
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 Outlook 2007 Macro to Run a Script From a Contact Form Using Outlook 41
B The “run a script” function stopped unexpectedly in Outlook2007 Using Outlook 6
E run script fails suddenly Using Outlook 3
L Run A Script not listed in rules wizard Outlook VBA and Custom Forms 12
X Run macro automatically when a mail appears in the sent folder Using Outlook 5
V Outlook macros no longer run until VB editor is opened Outlook VBA and Custom Forms 0
J Want to create a button on the nav bar (module add-in) to run code Outlook VBA and Custom Forms 2
T Outlook 2010 Errore run-time -2147417851 (80010105) Metodo delete ContactItem non riuscito Outlook VBA and Custom Forms 0
U Outlook 2019 VBA run-time error 424 Outlook VBA and Custom Forms 2
D Outlook 2013 Macros only run in VB editor, not in drop down or button Outlook VBA and Custom Forms 14
D We're sorry but outlook has run into an error Using Outlook 6
M White square in body of Outlook Messages (O2016 Version 2012 32bit Click To Run) Using Outlook 4
C Auto Run VBA Code on new email Outlook VBA and Custom Forms 1
A Apply Selected Emails to outlook rules and Run Rules Using Outlook 5
B VBScript doesn't run on Recipient Email Outlook VBA and Custom Forms 2
A Run-time error '430' on certain emails when trying to set "Outlook.mailitem" as "ActiveExplorer.Selection.Item" Outlook VBA and Custom Forms 2
S Outlook Custom Form Scripting only working when clicking on "Run this form" Outlook VBA and Custom Forms 2
O Outlook 2016 This rule will only run when you check your email in Outlook.... Using Outlook 4
B run scripts Using Outlook 1
A Run time error 424. object required in outlook 2013 Outlook VBA and Custom Forms 10
Dave A Run macro on existing appointment when it changes Outlook VBA and Custom Forms 1
O Run macro automatically at sending an email Using Outlook 11
P errors appear every time I run SCANPST Using Outlook 3
S VBA Macro - Run-time error '424': object required - Help Please Outlook VBA and Custom Forms 3
P Run Time Error 91 when linking contact to task in VBA Outlook VBA and Custom Forms 1

Similar threads

Back
Top