Using the Script Editor

Microsoft Outlook

Show All

Using the Script Editor

The Microsoft Script Editor allows you to add VBScript procedures that respond to events generated by items or form controls.

To open the Script Editor

  1. Open an item of the type to which you want to add code.
  2. On the Tools menu, point to Forms and then click Design This Form.
  3. On the Form menu, click View Code.

The Script Editor makes it easy to insert the template for an item event handler.

To insert a blank item event handler

  1. On the Script menu, click Event Handler.
  2. Select the event you want to respond to, and then click OK.

The Script Editor can move the insertion point to a specific line of code. This makes it easy to debug the script when Microsoft Outlook reports an error at a specific location.

To move to a specific line

  1. On the Edit menu, click Go To.
  2. In the Line Number box, type in the number of the line of code to which you want to go.

Learn about the Script Debugger.

Learn about the Outlook object browser.