views:

12

answers:

1

Hi, i want to print a document from browser using window.print(). I want browser not to show standart print dialog on current machine. I have all access to system registry and settings on it. Is there way to tweak the system in this way?

ps. Excuse me for my english.

A: 

Not sure if this still works, but there's an ActiveX control which can do this for you (from here)

<script language='VBScript'>
Sub Print()
       OLECMDID_PRINT = 6
       OLECMDEXECOPT_DONTPROMPTUSER = 2
       OLECMDEXECOPT_PROMPTUSER = 1
       call WB.ExecWB(OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMPTUSER,1)
End Sub
document.write "<object ID='WB' WIDTH=0 HEIGHT=0 CLASSID='CLSID:8856F961-340A-11D0-A96B-00C04FD705A2'></object>"
</script>
Paul Dixon
Not working - ie 7. Active Content enabled.
doctor-lg
Sorry, my fault - it works quite well. Thanks a lot!
doctor-lg