We have a handful of computers set up as "Kiosk" type stations for customers to sign into our facilities. So, we have full control of the computer the web page is displayed on. The page is not for general consumption by the Internet. It's on 14 of our local PCs.
With that stipulation, how can I get a web page (.aspx or .html I don't care) to print a confirmation number without displaying the print dialog first?
I've Googled my fingers raw and have found 29 variations of this:
OLECMDID_PRINT = 6
OLECMDEXECOPT_DONTPROMPTUSER = 2
OLECMDEXECOPT_PROMPTUSER = 1
call WB.ExecWB(OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMPTUSER,1)
document.write "<object ID='WB' WIDTH=0 HEIGHT=0 CLASSID='CLSID:8856F961-340A-11D0-A96B-00C04FD705A2'></object>"
... which I was not able to get to work.
That script breaks the page and nothing prints, no dialog, no nothing.
If I remove that script then the page prints, with the dialog.
I just want to print the page, instantly, with no dialog. Our customers just don't know what to do when a dialog pops up. It's sad, but I have to work with it.