Since you don't care anything about the details of the .msg file itself,
only its attachments, this is pretty easy to do. Use the
Namespace.GetItemFromTemplate method with the path to the .msg file as the
argument. The item that method returns will be a new unsent MailItem whose
Attachments collection you can then iterate.
--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx
"khcharles" <(E-Mail Removed)> wrote in message
news:519374F7-BE22-4AC9-9418-(E-Mail Removed)...
> the msg file is a outlook email item that was parsed out from a pst. I
> would
> like to extract out the attachments from them. So let's say that there is
> an
> msg file with an office document as an attachment. I would like to be
> able
> to save that document, doc, rtf, xls, whatever, into it's own file.
>
> in a nutshell i'd like to be able to programmatically open up loose email
> files and perform something analogous to a "save as" on it's attachments.
>
>> > Just wondering if there was a way of accessing an msg file. not an
>> > email
>> > through mapi but an actual "c:\new email.msg"