I agree. But Peter said he was using MSWord to create "the file", and he was talking about an html file. I did not see him complaining about what MSWord was creating for him, and dumping it to PDF, then it should be fine.
I use a web brower control/editor to compose message templates, not necessarily html "reports".
Curious, are you creating html "reports" and what are you using?
>Have you ever look at the HTML that Word creates? Using Word to create HTML is not a good idea.
>
>>If you are creating the html file in MSWord, i would think that you could use MSWord's "save as PDF" feature (which i believe was added in Word2010, there are downloads for earlier versions).
>>
>>
>>#define wdDoNotSaveChanges 0
>>#define wdExportFormatPDF 17
>>#Define wdAlertsNone 0
>>
>>llAttachPDF = .t.
>>TRY
>> WordObj = CREATEOBJECT("Word.Application")
>> WordObj.Application.DisplayAlerts = wdAlertsNone
>> WordObj.documents.open("&lcPassedInDoc")
>> WordObj.visible = .f.
>>
>> *--- lOpenPDF: is set to true or false. Controls whether PDF is displayed.
>> *---
>> WordObj.ActiveDocument.ExportAsFixedFormat("&lcPDFname", 17, lOpenPDF)
>>
>>
>>
>>>i vae a prg which creates an html document which I need as a pdf so I can email it to someone with all the photos in place
>>>I use cutepdf but that propmts for a file name
>>>
>>>is there a programatic way to do this? this is what I do at the bottom of the prg and it requires manual printing, adding afilename and then opening the pdf and emailing...
>>>I would like to do this fully automated
>>>possible??? How???
>>>
>>>
>>>
>>>lcWordFname = FULLPATH([TownDossier_]+lcTownName+[_]+CHRTRAN(TRANSFORM(DATETIME()),[\/: ],[])+[.htm])
>>>STRTOFILE(lcHTML , lcWordFname )
>>>
>>>
>>>Local oWord as word.application
>>>oWord=Createobject("word.application")
>>>oWOrd.Visible = .t.
>>>With oWord
>>> .documents.open(lcWordFname)
>>>
>>>ENDWITH
>>>oWord.ActiveDocument.SaveAs(lcWordFname)
>>>oWord.Activate()
>>>
>>>
>>>
>>>thanks
>>>
>>>
>>>Peter