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:

Reading Mail

Reading mail is a two-step process. First, the MAPIMessages control’s Fetch method retrieves messages from the Inbox into the control’s read buffer. Then messages are read by setting and reading the control’s properties. These properties will be discussed shortly, after the Fetch method is described.

The Fetch method has no parameters. Rather, its behavior is modified by the settings of some of the properties of the MAPIMessages control.

The FetchUnreadOnly property is a Boolean flag that, if set to True, causes a subsequent call to Fetch to retrieve only those messages that haven’t been read (i.e., the MsgRead property is False). If the FetchUnreadOnly property is False, its default value, the next call to Fetch retrieves all messages from the Inbox.

The FetchSorted property is a Boolean flag that, if set to True, causes a subsequent call to Fetch to sort the retrieved messages according to the order in which they were received. If the FetchSorted property is False, its default value, the messages are sorted according to the order specified by the Inbox. The MAPI controls don’t provide a way to modify the Inbox sort order.

The FetchMessageType property is a string that allows you to fetch messages that belong to a certain message class. When this property contains a zero-length string (as it does by default), messages are retrieved without regard to their message class. However, when this property has some other value, a subsequent Fetch retrieves only those messages ...

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