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 in Outlook 2007. In Outlook 2010, PostItem also works.
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 “Run a Script” Rules:
Additional Information:
Articles that may interest you:
Last reviewed on Sep 10, 2011


Hot Topics