LOCAL oHtml SET PATH TO (HOME() + "FFC") ADDITIVE oHtml = NEWOBJECT("HtmlListener","_reportlistener.vcx") oHtml.TargetFileName = "c:\caja\datos\Informe.htm" oHtml.QuietMode = .T. oHtml.xsltParameters = CREATEOBJECT("Collection") oHtml.xsltParameters.Add(6, "numberPrecision") oHtml.externalFileLocation = ".\images" oHtml.copyImageFilesToExternalFileLocation = .T. REPORT FORM total_xcuenta OBJECT oHtmlI get the file "Informe.htm". If I click on it the explorer opens and there it is, my vfp report in it.
OCAL ceMailRemitente as String, cContrasena as String, cTitulo as String, cTexto as String ceMailRemitente = "olgagaya@GMAIL.com" cContrasena = "PaulaSunde" cTitulo = "Caja - Totales x cuenta === Período " + DTOC(thisform.txtFechaInicial.Value) + " - " + DTOC(thisform.txtFechaFinal.Value) cTexto = "tita 8" LOCAL cEsquema as String, oCDO as Object, oMsg as Object, oError as Object cEsquema = "http://schemas.microsoft.com/cdo/configuration/" TRY oCDO = CREATEOBJECT("CDO.Configuration") oMsg = CREATEOBJECT("CDO.Message") WITH oCDO.Fields DO CASE CASE "GMAIL" $ Upper(ceMailRemitente) .Item(cEsquema + "smtpserver") = "smtp.gmail.com" .Item(cEsquema + "smtpserverport") = 465 .Item(cEsquema + "sendusing") = 2 .Item(cEsquema + "smtpauthenticate") = .T. .Item(cEsquema + "smtpusessl") = .T. OTHERWISE WAIT WINDOW NOWAIT "No puedo enviar este e-mail. No conozco los parámetros necesarios del servidor de correo" ENDCASE .Item(cEsquema + "sendusername") = ceMailRemitente .Item(cEsquema + "sendpassword") = cContrasena .Update() ENDWITH WITH oMsg .Configuration = oCDO .From = "Olga Gaya " + ceMailRemitente .To = thisform.cDestinatarios .Subject = cTitulo .CreateMHTMLBody("file://c:\caja\datos\informe.htm", 0) .Fields.Update .Send() WAIT WINDOW NOWAIT 'Los eMails para ' + thisform.cNombres + ' fueron enviados exitosamente.' ENDWITH CATCH TO oError MESSAGEBOX("No pudieron enviarse los eMails" + CHR(13) + "Error Nº: " + TRANSFORM(oError.ErrorNo) + CHR(13) + "Mensaje: " + oError.Message) FINALLY ENDTRYAnd it works. Or almost. Because the page looses its format. Everything is placed on the left side.