![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
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 |
#2
|
|||
|
|||
![]()
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. |
#3
|
|||
|
|||
![]()
Thanks Sue. I am running an Access.mdb that will loop through several
records and create an email for each record. I would like the email to be displayed and the user decide if they would like to send the email. If they do, the procedure will do one thing, if they don't, another. "Sue Mosher [MVP-Outlook]" wrote: 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. |
#4
|
|||
|
|||
![]()
The message object variable will go out of scope of the procedure that creates it when the user sends or closes the item. If you want to handle either of those events, you'll need to instantiate a MailItem object WithEvents and use write event handlers for its Send and Close events.
-- 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 ... Thanks Sue. I am running an Access.mdb that will loop through several records and create an email for each record. I would like the email to be displayed and the user decide if they would like to send the email. If they do, the procedure will do one thing, if they don't, another. "Sue Mosher [MVP-Outlook]" wrote: 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? "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. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
false reminders for all contacts | Flip | Outlook - Installation | 0 | June 30th 06 11:24 AM |
Unread message indicator false | Cooler Dude | Outlook Express | 1 | March 25th 06 07:39 PM |