![]() |
Outlook/Excel return code to know if Sender pressed the SEND butto
Question: Using the Outlook object model within Excel, can I get the return
code to know if the Sender pressed the SEND button? I use the following code within Excel to send Outlook email. I would like to know how to determine if the user actually pressed the SEND button within Outlook. I will use the return code to log (or not) the activity. The sender must have the option to send or not. I am using this form vs the send mail dialog because this form allows the customization of the EmailBody based on information contained on the row associated with the recipient. I have checked both the Excel and Outlook communities and haven't found the answer. In addition, I have done a web search using "outlook object model email send" as the criteria and have found some very interesting stuff, but have not been able to get an answer (that I understand). Any help would be appreciated. Thanks, Regards, Gary ' 'Code segment €“ send an email with a custom letter based on recipient information 'contained in the row ' With OutMail .to = EmailTo .CC = "" .BCC = "" .Subject = EmailSubject .Body = EmailBody .Display End With ' 'Now check the return code. Did the sender press the send button, or did the user 'Close/Exit? ' If sent Then Log_it 'done |
All times are GMT +1. The time now is 07:38 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com