Version 2 of Printing html files under Windows with optcl

Updated 2010-10-28 08:34:46 by Kroc

Kroc - 28/10/2010

This is a quick and dirty trick to print html under Windows without any prompt dialog. It requires optcl and was widely inspired by RS's COM on! - a tiny web browser.

 package require optcl
 set htm [optcl::new -window .htm Shell.Explorer.2]
 $htm navigate [file nativename c://kroc.html]
 # if you want to see something : pack .htm -fill both -expand 1
 $htm ExecWB "OLECMDID_PRINT" "OLECMDEXECOPT_DONTPROMPTUSER"
 destroy .htm

Category Printing - Category Windows