O'Reilly logo

VBScript in a Nutshell by Ron Petrusha, Paul Lomax, Matt Childs

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The Form-Based Development Environment

Although this chapter will discuss attaching code to Outlook forms, rather than creating and modifying Outlook forms themselves, we’ll begin by looking at how the Outlook object model views the Outlook user interface and by briefly examining how you access and work with Outlook forms in design mode; both topics provides provide background that is necessary in order to begin coding. Then we’ll look at Outlook’s rather primitive VBScript environment.

Interfaces and Objects

Figure 6.1 shows a more-or-less standard Outlook window with Outlook displaying a mail folder. The Outlook window is divided into three parts, which correspond to four elements of the Outlook object model.

The Microsoft Outlook interface

Figure 6-1.  The Microsoft Outlook interface

The Folder List

On the left of the Outlook window is the Folder List. In the Outlook object model, this corresponds to the NameSpace object, which has a Folder collection in which each Folder object represents a folder in the MAPI store.

The Explorer

On the upper right of the Outlook window is the Explorer pane. (The term “Explorer” here is unrelated to Windows Explorer, the utility for displaying the Windows namespace and filesystem.) The Explorer pane is responsible for listing the items in the current folder. Each type of item has its own Explorer object, which is a member of the Explorers collection.

The Inspector

On the lower-right ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required