![]() |
Outlook Object Model via Excel -- return code after send?
I use the following OUTLOOK Object Model code to email sheets to users. I
need to know if the sender actually sent the email. I know how to get a return code using the SENDMAIL model, but I need to modify the body of the message. I have searched all documentation that I have, or have been able to find, including searching the OUTLOOK community Q&A's. Can a return code be sent back that tells me if the sender actually sent the email? Thanks regards, Gary Send email With OutMail .To = " .CC = "" .BCC = "" .Subject = "Ron, Thank you for making your code samples public!" .Body = Modified_message_based_on_sheet_content .Attachments.Add archivename .Display End With If emailsent then LogTheEmailSent Else Msgbox email was not sent! endif |
Outlook Object Model via Excel -- return code after send?
In my Outlook 2000 book, in a paragraph describing canceling an
event... "...when an event is cancelled, the event still fires, but the consequences of the event is cancelled. For example, if the user failed to enter data in the required field LastName, the 'Write' event can be used to warn the user and cancel the saving of the edited item, as we see in the code in Listing 4-14. Function Item_Write() if Item.LastName = "" then msgbox "Need to enter last name" Item_write = False end if End Function 'end quote So perhaps some code in the send event (not tested) Function Item_Send If Item_Send = false then Answer = Msgbox "Do you really want to cancel the Save?" If Answer = 1 then Item_send = false else Item_Send = True end if end if End Function |
All times are GMT +1. The time now is 01:48 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com