Using the “Rules and Alerts” option to “run a script”, the list of scripts to run is empty. What makes a script appear in the list?
The argument must by type MailItem or MeetingItem for the subroutine to be available in the Rules Wizard.
Something like this:
Public Sub ShowMessage(Item As Outlook.MailItem) 'code End Sub
Using VBA Editor
Open Outlook’s VBA editor by pressing Alt+F11 and expand Microsoft Office Outlook Objects then double click on ThisOutlookSession.
You’ll type or paste the code into the module, then create the rule with the ‘run script’ Action and select this script
More Information
Sample scripts for use in Rules:
Autoaccept a Meeting Request using Rules
How to process incoming messages in Microsoft Outlook (Outlookcode.com)
How to create a script for the Rules Wizard in Outlook (MSKB)
Articles that may interest you:
Last reviewed on Sep 10, 2011



Hot Topics