Organization of This Book

The book contains 12 chapters and 6 appendixes:

Chapter 1 gives an overview of messaging concepts. The chapter provides definitions for MAPI and CDO, presents their pros and cons, and discusses the kinds of applications that can be written to use this technology.

Chapter 2 provides a thorough explanation of MAPI architecture and an introduction to the technologies based on MAPI. This chapter provides fundamental concepts that are used throughout the book.

Chapter 3 examines Simple MAPI, which offers a subset of MAPI functionality. Simple MAPI should be used only by programmers who are maintaining existing Simple MAPI code. Other developers can safely skip this chapter.

Chapter 4 examines the MAPI ActiveX controls that come with the Professional and Enterprise editions of Visual Basic. These controls don’t expose the full functionality of MAPI (in fact, they use Simple MAPI internally), but they are sufficient for sending and receiving email with or without attachments. The controls have a shallow learning curve compared to other technologies described in this book. Jump directly to this chapter if you need to get something simple up and running quickly.

Chapter 5 introduces CDO and lays the foundation for understanding its use. It introduces the concept of object model and examines the CDO object model in particular.

Chapter 6 gives practical instruction in using CDO to send and receive email, including email with attachments, formatted text, and embedded documents.

Chapter 7 examines some of CDO’s advanced email functionality. It also provides a detailed look at the relationship between CDO and MAPI.

Chapter 8 shows how to manipulate schedule information residing in MAPI folders, including how to create meetings and meeting requests programmatically.

Chapter 9 shows how to manipulate task information residing in MAPI folders, including how to create, save, send, move, and delete task items. This chapter also explains why it’s difficult to access task information using CDO, and what you can (and can’t) do about it.

Chapter 10 shows how to manipulate contact information residing in MAPI folders.

Chapter 11 shows how to use CDO and the CDO Rendering Library to create awesome web applications. The CDO Rendering Library is powerful but difficult to use and under-documented. This chapter provides detailed instructions to get your application up and running.

Chapter 12 shows how to take advantage of this new technology. Although CDO for Windows 2000 doesn’t use MAPI and is not backward-compatible with CDO, it’s worth a look so that you’re not left wondering what it is and how your CDO applications fit into the Windows 2000 scheme.

Appendix A examines an alternative to MAPI-based email. This appendix shows how to use the Winsock control to send and receive Internet email without using MAPI.

Appendix B examines an alternative to CDO. This appendix shows how to use the Outlook object model (a MAPI-based technology that is included with Microsoft Outlook) to send and receive email.

Appendix C introduces this security patch from Microsoft. Installing the update reduces the threat from viruses such Melissa and ILOVEYOU, but it is likely to break code that uses CDO or the Outlook object model. This appendix gives an overview of the patch and tells how to get it.

Appendix D by Ron Petrusha, examines how to determine the platform on which an application is running. As discussed in Chapter 2, certain registry entries made by MAPI are in different locations depending on which operating system is in use. Programs that are to access these registry entries need to be able to determine the platform on which they are running.

Appendix E is for when you get stuck. There are links to sites with articles and information, and to MAPI- and CDO-related discussion lists.

Appendix F explains how to download this book’s sample code from the O’Reilly & Associates web site.

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.