>>>I am now successfully viewing HTML in a VFP form using the ActiveX browser. However, I cannot figure out how to print it. The HTML is a file on disk created from a VFP report using XFRX. This has to be simple. (I hope.)
>>
>>Simply put:
>>
>>oWebBrowser.document.execCommand("Print")
>>
>>In a command button to print the page.
>>
>>HTH :-)
>
>Gerald,
>I found the solution to the margin problem. I just set the margins in Internet Exporer Print Setup to as low as they would go and removed the header and footer macros. It now prints just fine. I'll just have to tell the customers to do that if they want to print.
>Thanks again for your help. I was hoping it would be that simple.
>
>You wouldn't know if there is a way to set those margins and macros programmaticly would you?
To pre-set the printer orientation,header,footer,margins and format, download the free script-x activex.
http://www.meadroid.com/scriptx/With this activex reference in your page, your user will be able to print without touching the IE settings.
Also, you can place the report inside a fixed width table to avoid right-side lost of data in the printed version.
HTH :-)
If we exchange an apple, we both get an apple.
But if we exchange an idea, we both get 2 ideas, cool...Gérald Santerre
Independant programmer - internet or intranet stuff - always looking for contracts big or small :)
http://www.siteintranet.qc.ca