MFCMapi access to Attachment Filenames and Recipients

MFCMapi access to Attachment Filenames and Recipients

Post by Andy » Fri, 27 Jul 2007 12:17:27



I am using the MFCMapi editor to dump Outlook's Mapi properties to a
neutral file which I can then read programmatically. This is working
well for most of the fields that I need to extract, using the Output
Table feature. The two items I cannot yet get hold of are the
Attachment Tables and the Recipient Tables. Is there some way of
dumping these two tables into two or more fields, along with the
content of the other fields?

I know I can inspect the contents of these two tables for an
individual message item by using the functions, Display Attachment
Table and Display Recipient Table, but how do I dump all this data to
a file for the whole mailbox?

Regards,
Andrew
 
 
 

MFCMapi access to Attachment Filenames and Recipients

Post by Dmitry Str » Fri, 27 Jul 2007 13:26:17

Recipient and attachment data can only be accessed by calling
IMessage::GetAttachmentTable and IMessage::GetRecipientTable, which means
you must open the parent message first.

Dmitry Streblechenko (MVP)
http://www.yqcomputer.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

 
 
 

MFCMapi access to Attachment Filenames and Recipients

Post by Stephen Gr » Fri, 27 Jul 2007 22:07:03

Andy,
Right click on a message and pick "Save Message(s) to File...". Then pick
Text File. That'll dump all the props of the message, all the rows of the
recipient table, and all the rows of the attachment table.

You can select multiple messages to do this with, or right click on a folder
and pick "Save folder contents as Text files".

If you're feelling really zany, right click on a message store and pick
"Dump Store Contents To Text (SLOW)".

Steve