Could not get embedded attachment

V

Vinayakc

Hi all,

I wrote one C++ add-in which gets all the attachments in the message
and save it to the disk.
I am using get_attachments() api for that. But if mail has embedded
attachment this api could not detect that attachment.
(By embeeded attachment I mean If you create mail in .rtf format and if
copy paste some image in the mail body.)
Can you please tell me why this happens? How can I detect the embedded
attachment in the mail body.
Waiting for your help.
Thanks and Regards
Vinayakc
 
V

Vinayakc

Hi Dmitry,
get_attachment returns attachment count as 0. So I could not get the
attachment object.
Even outlook is not considering these images as attachments. It is
considering it as part of message body only. So I am still stuck up
with this problem.
Regards
Vinayakc
 
D

Dmitry Streblechenko

Try to look at that message usingg MFCMAPI or OutlookSpy (click IMessage).
What do you see in GetAttachmentTable and in PR_RTF_COMPRESSED?

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

Vinayakc

Hi Dmitry,

I have tried with Outlook Spy. It is showing 0 rows in
GetAttachmentTable and value of PR_RTF_COMPRESSED is
MAP_E_NOT_ENOUGH_MEMORY.
If I forward this mail to hotmail account attachment is going as
WINMAIL.DAT file.

Thanks aand Regards
Vinayakc
 
D

Dmitry Streblechenko

That means that the data is inside the body, not a separate attachement.
What do you see when you select PR_RTF_COMPRESSED and look at the "Symb"
text box on the right hand side?

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

Vinayakc

HI Dmirty,
Yes. The data is inside the body.
The value of PR_RTF_COMPRESSED is MAPI_E_NOT_ENOUGH_MEMORY.
The symb textbox contains data.Lots of backslashes are there in the
text.
Shall i post that text here?

Thanks and regards
Vinayakc
 
D

Dmitry Streblechenko

No, that just means that there is no attachment, all the data is in the
message body.
You might want to save the RTF body to a file, then try to open and
manipulate it using the Word Object Model (I am no expert in doing that).

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

Vinayakc

Ohho...
Seems there is no solution for this using OOM or MAPI. I am also not
aware of the word object model. So for now I think I have to leave this
bug :(
Thank you very much Dmitry for your valuable time and suggestions ( As
you always give :) )
Regards
Vinayakc
 

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