Prints an HTML (Hypertext Markup Language) document from an HTML file (*.htm, *.html). This method prints the document immediately using your Internet Explorer web browser printing features (without launching the web browser). There is no need to use any of the object properties. See remarks below.
Where object evaluates to an ASP Printer object.
The PrintHTMLFile method has these arguments:
|HTMLFileName||String expression specifying the fully qualified file name of the HTML file to print.|
This method enables you to print an HTML document form an HTML file using your Internet Explorer web browser printing capabilities. The file will be printed exactly as you see it in your web browser, including any images that may appear in the HTML document. There is no need to set or use any of the ASP Printer object properties.
The following code line shows how to use this method to print an HTML document from an HTML file:
Note that by using this method, all object properties are ignored, whether set (or not) before calling this method. Also, setting the printer using the SetPrinter method will have no effect. The printer specified by your Internet Explorer "Print Setup" will be used.
When you use this method to print an HTML file, the Windows Print Dialog will not be displayed before sending the document to the printer.