The Outlook Script Editor

[Previous] [Next]

While creating forms and actions in the last two chapters, you might have wondered what the View Code option on the Form menu did. If you had selected the View Code command, the Outlook Script Editor would have appeared, showing you firsthand how VBScript is integrated with Outlook. Figure 5-1 shows the Script Editor displaying code from a sample application.

click to view at full size.

Figure 5-1. The integrated Outlook Script Editor.

The Script Editor allows you to add custom VBScript procedures and variables to your Outlook applications as well as use Outlook objects in your applications. Using the Script Editor, you can write VBScript to handle Outlook events. The Script Editor provides an Insert Event Handler dialog box, which lets you select the event you want to write a handler for. We'll discuss Outlook events more later in this chapter.

Outlook provides line numbers when reporting errors, and in the Script Editor, you can jump to a specific line of code. This feature makes it easier to debug any errant code in your application. To use this functionality, in the Script Editor, select Go To from the Edit menu, specify the line number, and click OK. Your cursor will be inserted at the specified line.



Programming Microsoft Outlook and Microsoft Exchange
Programming Microsoft Outlook and Microsoft Exchange, Second Edition (DV-MPS Programming)
ISBN: 0735610193
EAN: 2147483647
Year: 2000
Pages: 184

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net