Thread: .sent=False
View Single Post
  #2  
Old July 7th 06, 10:44 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default .sent=False

MailItem.Sent is a read-only property. You can't set it in code. Outlook sets it to True after the user (or a code statement) has sent the item.

What procedure is running your code?

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Steve" wrote in message ...
After successfuly putting together the code to open an outlook email and
letting the user decide to send the email or not, I would like the code to do
one thing if the user sends the email and another if they decide to canel.

When the user clicks cancel, I have code that says:

If .Sent = False Then
MsgBox "This message will not be sent.", 64, "Test System"
End If

But, if the user sends the email, the code stops. It does not process any
further. And guess what, If .sent=True does not do anything.

Help please.

Ads