LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 273
Default 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

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to cc the sender using vba and outlook cluckers Excel Discussion (Misc queries) 0 December 31st 09 06:13 PM
Outlook Object Model via Excel -- return code after send? gary Excel Programming 1 June 11th 07 02:30 PM
Extract Country/Region of email sender from outlook message bony_tony Excel Programming 0 March 7th 07 02:48 AM
How can I use Outlook express to send mail rather than Outlook by VBA code new.microsoft.com Excel Programming 5 August 3rd 05 03:45 PM
How can I use Outlook express to send mail rather than Outlook by VBA code new.microsoft.com Excel Programming 1 August 1st 05 12:45 PM


All times are GMT +1. The time now is 09:12 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"