How to open and extract the content in attachment?

G

Guest

Hi,

Is it possible to open and extract the content in attachment and save it to
MS Access.

Regards
Raju A
 
K

Ken Slovak - [MVP - Outlook]

Sure, save the attachment to the file system and load it into Access.

If you don't want to do that you'd have to either be running Outlook 2007 or
a call a lower level API than the Outlook object model to get at the
PR_ATTACH_DATA_BIN property (0x37010102), which is a PT_BINARY property.
You'd also need to access other properties of that item in the Attachments
table for attachment name and so on.

If you try to use the OOM from Outlook 2007 with the PropertyAccessor object
to retrieve PR_ATTACH_DATA_BIN it must be under about 4KB or you'll get a
MAPI_E_NOT_ENOUGH_MEMORY error, since PropertyAccessor doesn't fall back to
an IStream to read properties larger than it can handle with a direct MAPI
call.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top