Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Quick and easy way to send attachements using the default e-mail program

Tips -N- Tricks

Quick and easy way to send attachements using the default e-mail program

by  Mike Gagnon  Posted    (Edited  )
DO FindWindow
LOCAL lcPath, hWindow, lcDelimiter, lcFiles, lcMsgSubj
lcPath = SYS(5) + SYS(2003)
hWindow = GetActiveWindow()
lcDelimiter = ";"
lcFiles = "C:\app.prg" + lcDelimiter+ "C:\app.fxp" && Has to be valid files, you could use a Getfile() here.
lcMsgSubj = "Files Attached: App.prg,App.fxp."
= MAPISendDocuments (hWindow, lcDelimiter, lcFiles, lcMsgSubj, 0)
SET DEFAULT TO (lcPath)
PROCEDURE FindWindow
DECLARE INTEGER GetActiveWindow IN user32
DECLARE INTEGER MAPISendDocuments IN mapi32;
INTEGER ulUIParam, STRING lpszDelimChar,;
STRING lpszFullPaths, STRING lpszFileNames,;
INTEGER ulReserved
ENDPROC

Mike Gagnon
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top