Getting Started

The Outlook object model is made available to a Visual Basic project by setting a reference to the object model’s type library. Type libraries and object models were explained in Chapter 5, in the context of accessing CDO from Visual Basic. To set a reference to the Outlook object model, choose Project References from the Visual Basic menu. The References dialog box appears, as shown in Figure B-2.

The References dialog box

Figure B-2. The References dialog box

Scroll down the list of available references until you find “Microsoft Outlook 9.0 Object Library” (or the library appropriate to the version of Outlook you have installed). Select this item if it’s not already selected, and click OK.

Get CDO & MAPI Programming with Visual Basic: now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.