How to Save Embedded Message into Files with CDO?

N

nycboy

I use CDO to read message attachments and I want to save them as files
into a file folder. However CDO does not support WriteToFile for
CdoFileLink or CdoEmbeddedMessage attachments, is there an alternative
way of saving these type of messages into files?

Thanks!

-David
 
D

Dmitry Streblechenko \(MVP\)

Embedded attachments in the RTF messages are are really OLE storage files
(IStorage), they are meaningless by themselves. Note that even Outlook won't
let you save such attachments as files.

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

nycboy

Thanks Dmitry.

Did you mean that I can't even save the .msg files
if they are Outlook attachments (with CDO)?

David

---- Original Message ----
Re: How to Save Embedded Message into Files with CDO?
From: Dmitry Streblechenko \(MVP\)
Date Posted: 11/9/2004 12:25:00 PM

Embedded attachments in the RTF messages are are really OLE storage
files
(IStorage), they are meaningless by themselves. Note that even Outlook
won't
let you save such attachments as files.

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

Dmitry Streblechenko \(MVP\)

You can, but not with CDO - OOM should be fine (Attachment.SaveAsFile)
BTW, .MSG attachments are different from the embedded messages - .MSG
attachment is just a regular attachment with happens to contain an MSG file,
embedded message is an attachment of a special kind.
OLE attachments (embedded objects in RTF messages; plain text or HTML can
never have those) are off limits.

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

nycboy

But I am looking for a way of
recursively saving any .msg file
(if any) contained in a .msg file.
In other words, for any attached
msg file, I need to check whether
it contains .msg files itself. If
yes, I want to save them individually.
Is it possible to do?

Thanks.

David


---- original message ----
Re: How to Save Embedded Message into Files with CDO?

You can, but not with CDO - OOM should be fine (Attachment.SaveAsFile)
BTW, .MSG attachments are different from the embedded messages - .MSG
attachment is just a regular attachment with happens to contain an MSG
file,
embedded message is an attachment of a special kind.
OLE attachments (embedded objects in RTF messages; plain text or HTML
can
never have those) are off limits.

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

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