I'm pretty sure I've seen the solution to this on UT, but can not track it down.
When automating the sending of email via Outlook, how do I detect if the user has closed the email without sending the email?
i.e. how do I get a return value from the display() method in the following code, and what would it be in the case of the user aborting the send ?
loApplication=CREATEOBJECT("Outlook.Application")
loNameSpace=loApplication.GetNameSpace("MAPI")
loOutBox=loNameSpace.GetDefaultFolder(4)
THIS.oMessage=loOutBox.Items.Add
WITH THIS.oMessage
.Body=THIS.cBodyText
.Subject=THIS.cSubject
IF llShowOutlook
.display()
ELSE
.Send()
ENDIF
ENDWITH
Thanks
Barry Sutton