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:

Showing the Address Book

If you’re writing an application that allows the user to enter recipients for an outgoing message, it’s convenient for the user to have a way to display the address book and to select recipients directly from it. The MAPIMessages control makes this easy. Before continuing, however, note what the MAPI controls can’t do with the address book. The controls can’t programmatically manipulate the address book in any way. There isn’t even a way to enumerate the entries in the address book.

Now let’s talk about what the controls can do. The Show method of the MAPIMessages control, when called with no argument or with the argument set to False, displays the user’s address book. The UI is provided for you by the system. If you’ve programmatically set any recipients prior to showing the address book, these recipients will be shown as selected in the address book dialog box. Similarly, new selections or deletions made by the user in the address book dialog box are reflected in the MAPIMessages control’s recipient list immediately upon returning from the Show method.

By default, the address book allows the user to select only primary recipients, not copy or blind copy recipients. To change this behavior, set the AddressEditFieldCount property prior to calling the Show method. The default value is 1. Setting this property to causes the address book dialog box to disallow any selections at all. That is, the user is only allowed to browse the address book. Setting this ...

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