E
Eric
I've read all the previous posts about using the following methods to
add an attachment to a MAPI message from my COM add-in:
IMAPIFolder::CreateMessage()
IMessage::CreateAttach()
IAttach::SetProps() (set attachment method to 'by value')
IAttach::OpenProperty() to get the binary data property
Stream data to the property and save everything
All of this seems to work fine. When I open the email in Outlook I
can see the attachment, with the correct name ("Outlook1.bmp" in this
case), it has the correct icon, and also shows the correct file size.
If I double-click on the attachment Outlook says "The System Cannot
Find The Specified File". If I right-click on it and select "Save
As...", I can save it with no errors, and I can then open the file I
saved (with MSPaint in this case).
I assume Outlook is using some other property to try and create a temp
file so that I can open the file in MSPaint when I double-click it.
However, I've tried setting the PR_DISPLAY_NAME, PR_ATTACH_FILENAME,
PR_ATTACH_LONG_FILENAME, and even the PR_ATTACH_FILEPATH (which is not
supposed to be used for 'by value' attachments), and nothing has
worked...
Any ideas?
add an attachment to a MAPI message from my COM add-in:
IMAPIFolder::CreateMessage()
IMessage::CreateAttach()
IAttach::SetProps() (set attachment method to 'by value')
IAttach::OpenProperty() to get the binary data property
Stream data to the property and save everything
All of this seems to work fine. When I open the email in Outlook I
can see the attachment, with the correct name ("Outlook1.bmp" in this
case), it has the correct icon, and also shows the correct file size.
If I double-click on the attachment Outlook says "The System Cannot
Find The Specified File". If I right-click on it and select "Save
As...", I can save it with no errors, and I can then open the file I
saved (with MSPaint in this case).
I assume Outlook is using some other property to try and create a temp
file so that I can open the file in MSPaint when I double-click it.
However, I've tried setting the PR_DISPLAY_NAME, PR_ATTACH_FILENAME,
PR_ATTACH_LONG_FILENAME, and even the PR_ATTACH_FILEPATH (which is not
supposed to be used for 'by value' attachments), and nothing has
worked...
Any ideas?