Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Detect user cancels email send
Message
From
28/09/2011 17:07:57
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Detect user cancels email send
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01525141
Message ID:
01525141
Views:
89
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)

* Create message object
THIS.oMessage=loOutBox.Items.Add
WITH THIS.oMessage
  .Body=THIS.cBodyText
  .Subject=THIS.cSubject
  IF llShowOutlook
      .display()
  ELSE
    .Send()
  ENDIF
ENDWITH
Thanks
Barry Sutton
Next
Reply
Map
View

Click here to load this message in the networking platform