Run OS Command to print HTML file from IE

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I was wondering, is it possible to run an OS command to automatically print
an HTML file from Internet Explorer?

I am creating the file through a process, and an OS command can be run
automatically once it's created, so what I would really love to know is what
the command would be to open the file (I know the filename at this point) in
Internet Explorer, change the print orientation to "Landscape" and then print
it.

Any help would be much appreciated!

Cheers,
Luke
 
Luke B said:
Hi,

I was wondering, is it possible to run an OS command to automatically print
an HTML file from Internet Explorer?

I am creating the file through a process, and an OS command can be run
automatically once it's created, so what I would really love to know is what
the command would be to open the file (I know the filename at this point) in
Internet Explorer, change the print orientation to "Landscape" and then print
it.

Any help would be much appreciated!

Cheers,
Luke

Well, it would seem all you need to create windows script file in
which you can create instance of browser object, use "Navigate" method
and window.print() method in onload or such. Unfortunately, it does
not solve issue with "landscape" (doable through registry) and more
importantly, popup of print dialog prompt. If the goal is to provide
"quiet, controlled printing" you need 3rd party component -
www.htmlprinting.com provides one.
Thanks,
John
 
Back
Top