Procedure for Editing Scripts

Using Microsoft Outlook, choose New Event, and then Edit Script. This creates a stub script that contains these empty subroutines:

(The preceding names are for VBScript. The corresponding JavaScript names are Folder::OnMessageCreated, Message::OnChanged, Folder::OnMessageDeleted, and Folder::OnTimer.)

You can add scripting code to any of these subroutine sections to control its functionality. To indicate that the script should not respond to an event of that type, just leave a section blank, or delete the section. Although this script could be written to respond to events of all four types, you could also choose to use separate scripts for each event.

Note: Using VBScript and JavaScript  You can write a script in pure VBScript, pure JavaScript, or a mixture of the two. If you mix the two languages and you are making cross-language calls, you need to prefix variable names with the name of the language; for example, VBScript.MyVar or JavaScript.MyVar.