Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- This prints without asking which printer to send it to first.
- <html>
- <head>
- <title>Print Test</title>
- <script>
- function Print()
- {
- if (document.all)
- {
- WebBrowser1.ExecWB(6, 6) //use 6, 1 to prompt the print dialog or 6, 6 to omit it;
- WebBrowser1.outerHTML = "";
- }
- else
- {
- window.print();
- }
- }
- </script>
- </head>
- <body>
- <object ID="WebBrowser1" WIDTH="0" HEIGHT="0"
- CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2">
- </object>
- <A HREF="#" onClick="Print()">Print this page</a>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement