Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP Reports to HTML
Message
 
À
15/06/2000 11:15:28
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00380758
Message ID:
00381106
Vues:
20
Hi Thomas

If you want to send an frx in the body of a mail as HTML, here I put some
code to do that.
You must send it with Outlook 2000, and have ThsFrxtoHtml class from
Jaroslav Steigauff : Download the class from http://www.thskk.sk this class works very quickly and do the job.
It really works very well and Jaro has solved a big trouble to me.
The code to send by Outllok was posted to me by David Stevenson
Thanks to both of them and to all who answered my mails asking how to to this

* here is the code

PUBLIC sgoFH
LOCAL lcCurDir, LCaLIAS
lcHTMLFile = SYS(5) + CURDIR() + "Mailrep.htm"


SET CLASSLIB TO ThsRep ADDITIVE
sgoFH = CREATEOBJECT("ThsReportToHtml")

* here create the cursor as you wish

SELECT Tocfsum.ocom, Tocfsum.nom, Tocfsum.neto, Tocfsum.fechaped,;
Tocfsum.fechaprom, Tocfsum.observa, Tocfsum.condpag, Tocfsum.nrodep,;
Tocfsum.deposito, Tocfsum.dire, Tocfsum.loca, Tocfdet.codigo,;
Tocfdet.descri, Tocfdet.cant, Tocfdet.costo, Tocfdet.impor,
Tocfdet.unidad,;
Tocfdet.envase, Tocfdet.divisor;
FROM ocompra!tocfsum LEFT OUTER JOIN ocompra!tocfdet ;
ON Tocfsum.ocom = Tocfdet.ocom;
WHERE Tocfsum.ocom = 11 ;
ORDER BY Tocfsum.ocom INTO CURSOR MICURSOR
IF USED("MICURSOR")
SELECT MICURSOR


sgoFH.ThsFrxToHTML("mailrepx4.frx","MailRep.htm",.F.)

USE IN MICURSOR
ENDIF

RELEASE sgoFH
RELEASE CLASS ThsRep



LOCAL lcBody
IF FILE("Mailrep.htm")
lcBody = FILETOSTR("MailRep.htm")
ENDIF




o=createobject("outlook.application")
oitem=o.createitem(0)
oitem.display
oitem.recipients.add("charlie@arnet.com.ar")
oitem.subject="HTML Test"
oitem.htmlbody=lcbody
oitem.send
oitem=null
o=null

HTH
Carlos Etcheverry
Monte Grande
Buenos Aires
Argentina

Es mejor un mal dia de pesca que un buen dia de trabajo!
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform