Skip to Content
CDO & MAPI Programming with Visual Basic:
book

CDO & MAPI Programming with Visual Basic:

by Dave Grundgeiger
October 2000
Intermediate to advanced
384 pages
10h 22m
English
O'Reilly Media, Inc.
Content preview from CDO & MAPI Programming with Visual Basic:

Chapter 10. Contacts Folders

Contacts folders are an abstraction provided not by MAPI or CDO, but by Microsoft Outlook. To MAPI and CDO, a contact is just a message that happens to have certain properties useful for storing contact-related information. Because CDO doesn’t provide a class that exposes contact properties, it’s difficult to get at all of the contact information. This is the same problem that we had with tasks folders in the previous chapter. However, unlike with tasks, MAPI does define many standard property tags for storing and accessing contact information. These MAPI property tags can be used in conjunction with a CDO Field object to store and retrieve contact data. Just as with task items, however, some contact item properties can’t be accessed reliably through CDO because they are exposed as named properties. You learned why this is a problem in the previous chapter.

This chapter discusses the basic contact information that is available through a Message object and shows how to get additional contact information by going through a Field object. Also discussed is using the MessageFilter object to search for specific contacts.

Finding the Default Contacts Folder

A user can have any number of contacts folders, but one of them (the one created first) is considered to be the default contacts folder. CDO provides a simple way to get access to the default contacts folder. To do so, use the Session object’s GetDefaultFolder method, with an argument of CdoDefaultFolderContacts ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Excel® 2007 VBA Programmer's Reference

Excel® 2007 VBA Programmer's Reference

John Green, Stephen Bullen, Rob Bovey, Michael Alexander
COM Programming with Microsoft® .NET

COM Programming with Microsoft® .NET

John Paul Mueller, Julian Templeman

Publisher Resources

ISBN: 156592665XSupplemental ContentCatalog PageErrata