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:

Miscellanea

The MAPI controls provide some helper methods that you don’t strictly need but may find convenient when implementing certain common tasks. These are the Forward, Reply, ReplyAll, and Copy methods of the MAPIMessages control. These methods all copy the currently indexed message to the compose buffer, setting the MsgIndex property to -1. The Reply and ReplyAll methods set the recipient list appropriately and also add “RE:” to the beginning of the subject text. The Forward method clears the recipient list and adds “FW:” to the beginning of the subject text. The Copy method simply copies all properties over to the compose buffer. These methods do nothing to the message body, so if you want neat effects such as indenting the original message, you’ll have to do it programmatically.

The MAPIMessages control has a method called Save, which copies the message currently in the compose buffer to the Inbox. One way to use this is to allow the user to quit the application while in the middle of composing a message. The application could later resume by locating the message in the Inbox and calling the MAPIMessages control’s Copy method to copy the message back to the compose buffer. The Copy method doesn’t delete the message from the Inbox, so after sending the composed message, the application would need to go back to the Inbox, find the previously saved message, and delete it.

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