Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming Add-Ins / February 2004

Tip: Looking for answers? Try searching our database.

Construct MSG file at runtime from details

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Anushya - 30 Jan 2004 05:40 GMT
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
Dmitry Streblechenko \(MVP\) - 30 Jan 2004 23:03 GMT
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

> Hi
>
[quoted text clipped - 16 lines]
> Thanks
> Anushya
Anushya - 31 Jan 2004 07:07 GMT
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

> 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
[quoted text clipped - 28 lines]
> > Thanks
> > Anushya
Dmitry Streblechenko \(MVP\) - 02 Feb 2004 18:01 GMT
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

> Hi
> Thanks for your reply
[quoted text clipped - 38 lines]
> > > Thanks
> > > Anushya
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.