View Single Post
  #1  
Old December 21st 06, 11:12 PM posted to microsoft.public.outlook.program_vba
Michel S.
external usenet poster
 
Posts: 3
Default OL2003 & VBA : How to find if a message was actually sent or canceled

Hello !

I'm developing an Excel application.

At some point, a message is built and the result is displayed to the
user who may, after reviewing it :
- click to send the message (after editing it if required)
- decide to cancel the message by closing the message window.

This message is an Outlook.MailItem object.

After I .Display the message, I'd like to enter a loop waiting for that
message to be processed by the user and record in a variable whether he
clicked on "Send" or not.

Note that since this user may work offline, the message may not
actually be sent but sitting in the outbox instead. For the
application purpose, this situation is the same as a sent message.

Any suggestions on how to achieve this ?

And, as a side question : if the user send or close the message, what
will happen to the .MailItem object ?

Thanks


Ads