I program in FoxPro only a bit. I have this code, which will create a spreadsheet from a table, and open up an e-mail message with the spreadsheet as an attachment.
Question: what code can I add to pass put a vaiable in the subject or body of the message ?
___________________________________
PROCEDURE XLS_email
*** Create an Excel 5.0 file from oes_temp.dbf and send it as an e-mail attachment
filepath = "C:\oes" + ALLTRIM(curyear) + "sic" + ALLTRIM(cursiccode) + ".XLS"
filename = "oes " + curyear + " sic" + cursiccode
SELECT oes_temp
COPY TO &filepath. TYPE XLS
sendtoemail="C:\PROGRA~1\MICROS~2\Office\OUTLOOK.EXE " + filepath
RUN &sendtoemail.
DELETE FILE &filepath.
RETURN
____________________
Thanks!