1. You can't do that in OOM, only in Extended MAPI, CDO 1.21 or Redemption.
Namespace.CreateItemFromTemplate() is the closest thing to an import in
Outlook Object Model, but it does not work reliably.
2. In Outlook Object Model call MailItem.SaveAs(path, olMsg). In Extended
MAPI, see Q171907 on MSDN.
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
"Anushya" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi
> Thanks for your reply
>
> 1) How do you set properties and import a mail item back to inbox? Again i
> need to set read-only properties like senderName, received date?
>
> 2) How to create MSG file from Extended MAPI?
>
> Anushya
>
> "Dmitry Streblechenko \(MVP\)" <(E-Mail Removed)> wrote in message
news:<(E-Mail Removed)>...
> > 1. If you want to create an MSG file first, populate it with the
properties
> > and then import it back into Outlook, why do you need an MSG file?
Wouldn't
> > it be easier to create a message directly in Outlook and populate it
with
> > properties from your DB?
> > 2. Outlook uses Extended MAPI to create/access MSG files. You can do the
> > same if you were using Extended MAPI from C++/Delphi.
> >
> > Dmitry Streblechenko (MVP)
> > http://www.dimastr.com/
> > OutlookSpy - Outlook, CDO
> > and MAPI Developer Tool
> >
> >
> > "Anushya" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > Hi
> > >
> > > i maintain the message body and some headers like fromid,
> > > receiveddate,etc in access database.
> > >
> > > I am able to create a .MSG file and to post it back to inbox. But
> > > creating and maintaining .MSG files for all the mails will be a
> > > head-ache.
> > >
> > > What i wanted to do is maintain all the details in database and need
> > > to create .msg files as and when i need. My queries are
> > >
> > > 1)Is it possible to create a new message file from the details i have
> > > in database??
> > >
> > > 2)What is the component used in outlook while we save the message as
> > > .msg file. Is it possible to use that component?
> > >
> > > Thanks
> > > Anushya