Gossamer Forum
Home : General : Internet Technologies :

Make a webpage print without the print dialog coming up?

Quote Reply
Make a webpage print without the print dialog coming up?
I have a webpage with a button on it, i want it to print the whole page when you click this button with out popping up the printer dialog box, is this possible? and how do you do it if it is?
Quote Reply
Re: [WoSkI] Make a webpage print without the print dialog coming up? In reply to
I'm not sure it is. Well, it probably is but you'd have to use something like an activex control to send a message to the printer dialog to simulate the user clicking "OK" (or whatever the button is).

Aside from that I don't think it is possible.
Quote Reply
Re: [WoSkI] Make a webpage print without the print dialog coming up? In reply to
Code:
Sub PrintMe()
Dim x As Boolean
x = Options.PrintBackground
Application.DisplayAlerts = wdAlertsNone
Options.PrintBackground = False
ActiveDocument.PrintOut
Application.DisplayAlerts = wdAlertsAll
Options.PrintBackground = x
End Sub

Last edited by:

Paul: Feb 1, 2003, 3:44 PM
Quote Reply
Re: [Paul] Make a webpage print without the print dialog coming up? In reply to
ok, so how does this work? i tried it and it did absolutely nothing. I had to remove the first dim line or else it gave errors. Do you just put it on your page as vbscript and call that function or what? if so it dont do a thing, i put a messagebox in the function to see if it worked and it popped up the message box whenyou click the print button so the function runs but it dont do anything.
Quote Reply
Re: [WoSkI] Make a webpage print without the print dialog coming up? In reply to
Heh, its code for an activex control. You have to compile it in VB and use an <OBJECT> tag in your page.

It's probably not worth your trouble though as you'd have to get a digital signature which is about $400/yr
Quote Reply
Re: [Paul] Make a webpage print without the print dialog coming up? In reply to
ok, think i will just put up with a print box coming up first.