This applies to Outlook 2010 and newer, including Outlook 365, 2021, 2019, 2016.
Office users who use run-a-script rules are discovering their scripts are currently disabled (as is Start Application), thanks to a security update. When the update is installed, any existing run-a-script and run application rules will be disabled.
To fix, you need to set the EnableUnsafeClientMailRules value in the registry then restart Outlook.
Outlook 2016 and newer
If you don't want to edit the registry yourself, you can use this ready-to-use .reg file.
Outlook 2016/2019/2021/365 Outlook 2013
One option is to convert the run-a-script to an ItemAdd macro. Depending on the conditions in your rule, converting it to an ItemAdd macro may be as simple as adding the application startup macro, renaming the script, and adding an If statement. For information on using ItemAdd macros, see How to use an ItemAdd Macro.
I AM UNABLE TO SELECT SCRIPTS AFTER SELECTING RUN A SCRIPT
The box with the scripts is empty?
Did you format the script name properly? You need something in the () - example: sub scriptname (item as mailitem)
Thank you! it worked
I need to forward the emails received in a certain mail box to one of the sendor mentioned in the To addresses field, what rule or script should I reply
Will there be more than one address in the To field?
This page has samples, but will need to be tweaked if forwards go to different people each time.
I had my pc rebuilt and have allowed unsafe rules. The rule will move a file to a folder but doesn't run the script, no error message. Macros have been allowed etc.
So you have the rule moving it then running a script? You should only use conditions in the rule - actions should be in the script.
Yes, I found the reason I had copied all the rules from a text file which still had a title in it above the scripts that prevented it working. All good now thanks.
Just sharing this. You can do very cool things with this!
Execute PowerShell Scripts from Your Smartphone | Dmitry's Blog: Cloud, PowerShell and beyond (wordpress.com)
My organisation doesn't allow to set this in registry.
Is there any other workaround for this?
I want to save an attachment from a mail which I receive daily to a folder on a network drive folder.
No, there is no other way if you can't run scripts. Sorry.
any idea why its called EnableUnsafeClientMailRules
What exactly is unsafe about it
It is disabled because it can do things outside of outlook (start application is disabled too). While it is hard to install an outlook macro, there was an exploit that used run application.
Detect and remediate the Outlook rules and custom forms injections attacks. - Office 365 | Microsoft Docs
Thank you for your quick response
How we can do the same thing with Office 365 ?
Thanks in advance
Office 365 desktop software is office 16 - just use the 2-16 keys.
Thank you. This is great!