dtstamp=TTOC(DATETIME()) datetimestamp='<p><b><fontsize="5">Date/Time '+dtstamp+',</font></b></p>' loEmailItem.HTMLBody=lcBody+datetimestampwhere lcBody is the converted, through FILETOSTR, document. In my example, I'm scanning through the table and doing this for each record. This way the TO: line from Outlook only has one address in it. When I run it, I end up with however many records there are in the table in the Outlook OutBox, each adressed to a different person but with the text, from the .htm document, and the timestamp on each one.
>>SELECT * from machines WHERE modelname='Greg' INTO CURSOR temp >>loOutlook = CREATEOBJECT('outlook.application') >>lcBody =FILETOSTR('email.htm') && .htm file created in Word 2000 >>SCAN >> loEmailItem=loOutlook.createItem(0) >> loEmailItem.To=temp.email1 >> loEmailItem.Subject='This is the subject' >> dtstamp=TTOC(DATETIME()) >> datetimestamp='<p><b><fontsize="5">Date/Time '+dtstamp+',</font></b></p>' >> loEmailItem.HTMLBody=lcbody+datetimestamp >> loEmailItem.Send >>ENDSCAN >>loOutlook=.null. >>RELEASE loOutlook >>CLOSE DATABASES >>