MAPI Attachment Methods
The way in which you can access the contents of a PST message attachment is determined by the MAPI attachment method applied to the attachment. For example, if the attachment is an embedded OLE object, it uses the ATTACH_OLE
attachment method. KeyView can access message attachments that use the following attachment methods:
ATTACH_BY_VALUE ATTACH_EMBEDDED_MSG ATTACH_OLE ATTACH_BY_REFERENCE ATTACH_BY_REF_ONLY ATTACH_BY_REF_RESOLVE
Attachments using the ATTACH_BY_VALUE
, ATTACH_EMBEDDED_MSG
, or ATTACH_OLE
attachment methods are extracted automatically when the PST file is extracted. An "attach by reference" method means the attachment is not in Outlook, but Outlook contains an absolute path to the attachment. Before you can extract these types of attachments, you must retrieve the path to access the attachment.
To extract "attach by reference" attachments
- Determine whether the attachment uses an
ATTACH_BY_REFERENCE
,ATTACH_BY_REF_ONLY
, orATTACH_BY_REF_RESOLVE
method by retrieving the MAPI propertyPR_ATTACH_METHOD
. - If the attachment uses one of the "attach by reference" methods, get the fully qualified path to the attachment by retrieving the MAPI properties
PR_ATTACH_LONG_PATHNAME
orPR_ATTACH_PATHNAME
. - You can then either copy the files from their original location to the path where the PST file is extracted, or use the Filter API methods to filter the attachment.