Saving & opening *.msg files

S

Steve Pull

I've written a project using VB6 with the Outlook object
to create and send mail messages. I want to keep copies of
mail messages in .msg files. When I'm ready to send the
mail I use the following
objMailItem.SaveAs <FileName>, olMsg
objMailItem.Send
This works OK but when I open the file (by double clicking
in windows explorer) it shows
This message has not been sent
Any suggestions as to how I could do a SaveAs after the
Send would be much appreciated.

Also any suggestions how to re-open the .msg file in VB as
this doesn't seem to be in the outlook object.
 
D

Dmitry Streblechenko

You can wait until the message ends up in the Sent Items folder (e.g. you
can use MAPIFolder.Items.ItemAdd event), then save it from there.

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