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.
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 ...