• Outlook User
  • New Outlook app
  • Outlook.com
  • Outlook Mac
  • Outlook & iCloud
  • Developer
  • Microsoft 365 Admin
    • Common Problems
    • Microsoft 365
    • Outlook BCM
    • Utilities & Addins

Run-a-Script Rules Missing in Outlook

Slipstick Systems

› Outlook › Rules, Filters & Views › Run-a-Script Rules Missing in Outlook

Last reviewed on November 25, 2024     69 Comments

Applies to: Outlook (classic), Outlook 2010, Outlook 365 (Win), Windows

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.

missing run a script

To fix, you need to set the EnableUnsafeClientMailRules value in the registry then restart Outlook.

Outlook 2016 and newer
HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Outlook\Security
DWORD: EnableUnsafeClientMailRules
Value: 1

Outlook 2013
HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Outlook\Security
DWORD: EnableUnsafeClientMailRules
Value: 1

Outlook 2010
HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Outlook\Security
DWORD: EnableUnsafeClientMailRules
Value: 1

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
Outlook 2010

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.

More Information

The option to "Run a Script" has disappeared from the Outlook rules

Run-a-Script Rules Missing in Outlook was last modified: November 25th, 2024 by Diane Poremsky

Related Posts:

  • Creating an AND rule in Outlook Rules
  • Outlook Folder Homepages are missing
  • Start Outlook using a different VBA Project file
  • Disable the Unsafe Hyperlink Warning when Opening Attachments

About Diane Poremsky

A Microsoft Outlook Most Valuable Professional (MVP) since 1999, Diane is the author of several books, including Outlook 2013 Absolute Beginners Book. She also created video training CDs and online training classes for Microsoft Outlook. You can find her helping people online in Outlook Forums as well as in the Microsoft Answers and TechNet forums.

Subscribe
Notify of
69 Comments
newest
oldest most voted
Inline Feedbacks
View all comments

Albertan
March 10, 2023 2:01 am

Hello Diane, for some reason run script is not showing even if I put 1 or 2 in the value (I have Office 365) in the specified Registry path. What could be the reason?

2
0
Reply
Shylesh KR
February 11, 2023 4:06 pm

To add a folder in my hard disk I edited the registry then the Script editor is not saving any data and showing as empty ?
I ran the following code in the script editor
kinldy advise

Sub saveAttachments(Item As Outlook.MailItem)
 Dim objAtt As Outlook.Attachment
 Dim saveFolder As String
 Dim dateFormat
  
 dateFormat = Format(Now, "yyyy-mm-dd H-mm-ss")
 saveFolder = "C:\Attachments\" & Item.SenderEmailAddress & " " & dateFormat"
  
 If Not objFSO.FolderExists(saveFolder) Then
  objFSO.CreateFolder saveFolder
 End If
  
 For Each objAtt In Item.Attachments
  objAtt.SaveAsFile saveFolder & "\" & objAtt.DisplayName
  Set objAtt = Nothing
 Next
End Sub

0
0
Reply
kRI
December 18, 2022 10:14 pm

I AM UNABLE TO SELECT SCRIPTS AFTER SELECTING RUN A SCRIPT

1
0
Reply
Diane Poremsky
Author
Reply to  kRI
December 18, 2022 11:19 pm

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)

2
0
Reply
kRI
Reply to  Diane Poremsky
December 19, 2022 7:09 am

Yes, The box with the scripts is empty. Below script is saved in text format on my desktop folder in .txt file.
Public Sub SaveAttachmentsToDisk(MItem As Outlook.MailItem)
Dim oAttachment As Outlook.Attachment
Dim sSaveFolder As String
sSaveFolder = ""
For Each oAttachment In MItem.Attachments
oAttachment.SaveAsFile sSaveFolder & oAttachment.DisplayName
Next
End Sub

0
0
Reply
kRI
Reply to  Diane Poremsky
December 26, 2022 10:49 am

Thank you! it worked

0
0
Reply
Rafeek Masani
October 27, 2022 7:52 am

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

0
0
Reply
Diane Poremsky
Author
Reply to  Rafeek Masani
October 28, 2022 8:31 am

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.
https://www.slipstick.com/outlook/rules/run-script-rule-change-subject-message/

0
0
Reply
Mark
July 19, 2022 6:35 pm

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.

0
0
Reply
Diane Poremsky
Author
Reply to  Mark
July 20, 2022 12:50 am

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.

0
0
Reply
Mark
Reply to  Diane Poremsky
July 20, 2022 12:54 am

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.

0
0
Reply
Joe
June 20, 2022 7:48 am

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)

0
0
Reply
Nikhil
December 17, 2021 3:54 am

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.
Please help!

1
0
Reply
Diane Poremsky
Author
Reply to  Nikhil
June 20, 2022 2:03 pm

No, there is no other way if you can't run scripts. Sorry.

1
0
Reply
Nicole
Reply to  Nikhil
February 21, 2023 10:55 am

If you have access to powershell you can try :

if((Test-Path -LiteralPath "HKCU:\SOFTWARE\Microsoft\Office\16.0\Outlook\Security") -ne $true) { New-Item "HKCU:\SOFTWARE\Microsoft\Office\16.0\Outlook\Security" -force -ea SilentlyContinue };
New-ItemProperty -LiteralPath 'HKCU:\SOFTWARE\Microsoft\Office\16.0\Outlook\Security' -Name 'EnableUnsafeClientMailRules' -Value 1 -PropertyType DWord -Force -ea SilentlyContinue

2
0
Reply
Simon
August 30, 2021 10:00 am

any idea why its called EnableUnsafeClientMailRules
What exactly is unsafe about it

0
0
Reply
Diane Poremsky
Author
Reply to  Simon
August 30, 2021 12:45 pm

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

0
0
Reply
Simon
Reply to  Diane Poremsky
August 30, 2021 12:47 pm

Thank you for your quick response

0
0
Reply

Visit Slipstick Forums.
What's New at Slipstick.com

Latest EMO: Vol. 30 Issue 29

Subscribe to Exchange Messaging Outlook






Support Services

Do you need help setting up Outlook, moving your email to a new computer, migrating or configuring Office 365, or just need some one-on-one assistance?

Our Sponsors

CompanionLink
ReliefJet
  • Popular
  • Latest
  • Week Month All
  • Jetpack plugin with Stats module needs to be enabled.
  • Move Deleted Items to Another Folder Automatically
  • Open Outlook Templates using PowerShell
  • Count and List Folders in Classic Outlook
  • Google Workspace and Outlook with POP Mail
  • Import EML Files into New Outlook
  • Opening PST files in New Outlook
  • New Outlook: Show To, CC, BCC in Replies
  • Insert Word Document into Email using VBA
  • Delete Empty Folders using PowerShell
  • Warn Before Deleting a Contact
Ajax spinner

Recent Bugs List

Microsoft keeps a running list of issues affecting recently released updates at Fixes or workarounds for recent issues in classic Outlook (Windows).

For new Outlook for Windows: Fixes or workarounds for recent issues in new Outlook for Windows .

Outlook for Mac Recent issues: Fixes or workarounds for recent issues in Outlook for Mac

Outlook.com Recent issues: Fixes or workarounds for recent issues on Outlook.com

Office Update History

Update history for supported Office versions is at Update history for Office

Outlook Suggestions and Feedback

Outlook Feedback covers Outlook as an email client, including Outlook Android, iOS, Mac, and Windows clients, as well as the browser extension (PWA) and Outlook on the web.

Outlook (new) Feedback. Use this for feedback and suggestions for Outlook (new).

Use Outlook.com Feedback for suggestions or feedback about Outlook.com accounts.

Other Microsoft 365 applications and services




New Outlook Articles

Move Deleted Items to Another Folder Automatically

Open Outlook Templates using PowerShell

Count and List Folders in Classic Outlook

Google Workspace and Outlook with POP Mail

Import EML Files into New Outlook

Opening PST files in New Outlook

New Outlook: Show To, CC, BCC in Replies

Insert Word Document into Email using VBA

Delete Empty Folders using PowerShell

Warn Before Deleting a Contact

Newest Code Samples

Open Outlook Templates using PowerShell

Count and List Folders in Classic Outlook

Insert Word Document into Email using VBA

Warn Before Deleting a Contact

Use PowerShell to Delete Attachments

Remove RE:, FWD:, and Other Prefixes from Subject Line

Change the Mailing Address Using PowerShell

Categorize @Mentioned Messages

Send an Email When You Open Outlook

Delete Old Calendar Events using VBA

Repair PST

Convert an OST to PST

Repair damaged PST file

Repair large PST File

Remove password from PST

Merge Two Data Files

Sync & Share Outlook Data

  • Share Calendar & Contacts
  • Synchronize two computers
  • Sync Calendar and Contacts Using Outlook.com
  • Sync Outlook & Android Devices
  • Sync Google Calendar with Outlook
  • Access Folders in Other Users Mailboxes

Diane Poremsky [Outlook MVP]

Make a donation

Mail Tools

Sending and Retrieval Tools

Mass Mail Tools

Compose Tools

Duplicate Remover Tools

Mail Tools for Outlook

Online Services

Calendar Tools

Schedule Management

Calendar Printing Tools

Calendar Reminder Tools

Calendar Dates & Data

Time and Billing Tools

Meeting Productivity Tools

Duplicate Remover Tools

Productivity

Productivity Tools

Automatic Message Processing Tools

Special Function Automatic Processing Tools

Housekeeping and Message Management

Task Tools

Project and Business Management Tools

Choosing the Folder to Save a Sent Message In

Run Rules on messages after reading

Help & Suggestions

Submit Outlook Feature Requests

Slipstick Support Services

Buy Microsoft 365 Office Software and Services

Visit Slipstick Forums.

What's New at Slipstick.com

Home | Outlook User | Exchange Administrator | Office 365 | Outlook.com | Outlook Developer
Outlook for Mac | Common Problems | Utilities & Addins | Tutorials
Outlook & iCloud Issues | Outlook Apps
EMO Archives | About Slipstick | Slipstick Forums
Submit New or Updated Outlook and Exchange Server Utilities

Send comments using our Feedback page
Copyright © 2025 Slipstick Systems. All rights reserved.
Slipstick Systems is not affiliated with Microsoft Corporation.

:wpds_smile::wpds_grin::wpds_wink::wpds_mrgreen::wpds_neutral::wpds_twisted::wpds_arrow::wpds_shock::wpds_unamused::wpds_cool::wpds_evil::wpds_oops::wpds_razz::wpds_roll::wpds_cry::wpds_eek::wpds_lol::wpds_mad::wpds_sad::wpds_exclamation::wpds_question::wpds_idea::wpds_hmm::wpds_beg::wpds_whew::wpds_chuckle::wpds_silly::wpds_envy::wpds_shutmouth:
wpDiscuz

Sign up for Exchange Messaging Outlook

Our weekly Outlook & Exchange newsletter (bi-weekly during the summer)






Please note: If you subscribed to Exchange Messaging Outlook before August 2019, please re-subscribe.

Never see this message again.

You are going to send email to

Move Comment