retreive sent message

  • Thread starter Thread starter kappe79
  • Start date Start date
K

kappe79

Hi,
I'm writing a little program in vb and I have a problem with sent
messages.
In my code i use this command:

reply = selectedmail.Reply
reply.Display(True)

After that the user can answer to the selected mail throught outlook.
The problem is that, after the user has sent the reply, i loose the
connection with the reply mail and so i' can't retreive, i.e., the body
and the other properties .
Is there a way to keep an instance of the mail after it has been sent?

many thanks!
 
When a message is sent, it must be immediately dereferenced since it twill
be handed over to a transport provider that will submit the message and move
it to the Sent Items folder. The sent message in the Sent Items folder is
physically different message from the one you had before.
You can either search for that message in the Sent Items folder based on,
for example, a custom user property that you can set before calling Display.
Or you can trap the MailItem.Sent event (not to be confused with the Send
method) and access all the necessary properties in the event handler. Thee
vent handler is called after teh user hits the Send button but before it is
actually sent.

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