MFCMapi access to Attachment Filenames

A

AndyH

I am using the MFCMapi utility to dump Outlook's Mapi properties to a
file that I can read programmatically. I have this working well for
all properties except for the Filenames of attachments.

I cannot find any Tags/Properties that reference Attachments
Filenames.

Any suggestions please?

Regards,
Andrew
 
K

Ken Slovak - [MVP - Outlook]

You're accessing the Attachments table?

The FileName would be PR_ATTACH_FILENAME (0x3704001E) and/or
PR_ATTACH_LONG_FILENAME (0x3707001E). DisplayName would be PR_DISPLAY_NAME
(0x3001001E). All are PT_STRING8 property types.

A better place to post programming questions like this would be either in
the MAPI group (microsoft.public.win32.programmer.messaging) or in an
Outlook programming group (microsoft.public.outlook.program_vba).
 
A

AndyH

Thank you Ken for the tips on where to post this sort of question. I
will certainly look there in the future. In the mean time if I could
just add to this thread again.

I have tried to select the codes you refer to, but the resulting codes
in the output table become 0x3704000A, 0x3707000A and 0x3001000A as
follows:

*************************************************
Tag: 0x3704000A
Type: PT_ERROR
Other Names: PR_ATTACH_FILENAME, PR_ATTACH_FILENAME_A,
PR_ATTACH_FILENAME_W, "Err:0x8004010F=MAPI_E_NOT_FOUND", ""

Tag: 0x3707000A
Type: PT_ERROR
Other Names: PR_ATTACH_LONG_FILENAME, PR_ATTACH_LONG_FILENAME_A,
PR_ATTACH_LONG_FILENAME_W, "Err:0x8004010F=MAPI_E_NOT_FOUND", ""

Tag: 0x3001000A
Type: PT_ERROR
Other Names: PR_DISPLAY_NAME, PR_DISPLAY_NAME_A, PR_DISPLAY_NAME_W,
"Err:0x8004010F=MAPI_E_NOT_FOUND", ""
*************************************************

I do not know how to interpret these error statements. I guess I
don't understand the process of accessing the Attachments table.
Any help in solving this would be much appreciated.

Regards,
Andrew
 
K

Ken Slovak - [MVP - Outlook]

I don't use MFCMAPI so I can't help with specifics of that. I use OutlookSpy
as my MAPI viewer. In OutlookSpy you don't get attachment properties from
the properties of an item, you have to go to the Attachment Table tab. In
MAPI terms you have to issue a request to open the Attachments table on the
item. How you'd do that with MFCMAPI I have no idea.

Stephen Griffin posts in the messaging group I pointed you to, and he's the
author of MFCMAPI, so if anyone would know the specifics of that program he
would.
 

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