Prints an HTML (Hypertext Markup Language) document either from a file or form a live url.
Where object evaluates to an ASP Printer object.
The PrintHTMLDocument method has these arguments:
String expression specifying the fully qualified file name or url of the HTML file or url to print.
This method prints the document immediately using the Microsoft 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.
This method enables you to print an HTML document form an HTML file or from a live url using your web browser printing capabilities. The file or url 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 examples show how to use this method to print an HTML document from an HTML file or from a live url:
'Printing an HTML file example:
'Printing a live url example:
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 in the Microsoft Internet Explorer web browser "Print Setup" will be used.
When you use this method to print an HTML file or a live url, the Windows Print Dialog will not be displayed before sending the document to the printer.