I'd like to have FoxPro pop up the Outlook mail reader and display a completed e-mail message that the user can review, edit, send, or abandon. The following code gets me almost there--but the user still has to click Ctrl-V to paste in the message. The insertion point is already positioned correctly.
Execution halts after the ShellExecute() until the user closes the Outlook window, so--even if I could figure out how to use _EdPaste(), it wouldn't do the paste while Outlook is still open.
I have found articles in MSKB on sending e-mail from VFP using active messaging (Q175052), MAPI (Q152772), or OLE messaging (Q146641); but none of these schemes opens the mail reader that the user knows and loves and allows her to inspect and edit the message before it goes out.
Is there any way to do this?
Code:
m.eaddress = 'myaddress@hotmail.com'
m.mysubject = 'This is my subject.'
_cliptext = 'This is my message, pasted in from the ClipBoard.'
CLEAR DLLS
DECLARE INTEGER ShellExecute IN Shell32 LONG hwnd, STRING lpOperation, STRING lpFile
DECLARE INTEGER GetActiveWindow IN Win32api
WAIT WINDOW "Click Ctrl-V to insert message." NOWAIT
ShellExecute(GetActiveWindow(), 'Open', 'mailto:' + ;
m.eaddress + '?subject=' + m.mysubject)
Execution halts after the ShellExecute() until the user closes the Outlook window, so--even if I could figure out how to use _EdPaste(), it wouldn't do the paste while Outlook is still open.
I have found articles in MSKB on sending e-mail from VFP using active messaging (Q175052), MAPI (Q152772), or OLE messaging (Q146641); but none of these schemes opens the mail reader that the user knows and loves and allows her to inspect and edit the message before it goes out.
Is there any way to do this?