• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 573
  • Last Modified:

With the Hide Print Window object, what version of IE is required?

What versions of IE are supported with the IE Hide Print Window object???

This is in reference to the question, Disable Printer Dialog Box when Printing entered on this site.  The code works for me in IE 6 but not in IE 5.  Is this correct?

Print current window without Print Dialog window popping up.

<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-4FD705A2"></OBJECT>
0
aklare
Asked:
aklare
1 Solution
 
mgfranzCommented:
The Web Browser Control and ExecWB for printing was pretty much disabled in IE5, all the features worked excellent in IE4 and from what I have seen they have been restored in IE6.  Only a select group of features worked in IE5.  More here;

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnie55/html/wb_print.asp
0
 
DreamMasterCommented:
Why do you want to disable the printer dialog box? Can't the user select his own printer? If I enter your website and I want to print and am not allowed to use my own selection of printers then that is the last you will ever see of me as a user.

Anyway, mqfranz mentioned the differences per version so not much to tell there. Just remember...users value some degree of freedom..

Max.
0
 
aklareAuthor Commented:
This is only for several users, who will need to print often.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
ansi_cCommented:
I get
Error: Object doesn't support this property or method: 'wbp.DefaultPrinterName'

when i use http://msdn.microsoft.com/workshop/browser/wb_print.asp
0
 
mgfranzCommented:
Did you create an ActiveX out of the code?

As I said, ExecWB does not work well in IE5, Windows.Print() is the prefered method.  Why don't you post your code...
0
 
ansi_cCommented:
i tried this

<HTML>
<HEAD>
<OBJECT ID="wbp"
CLASSID="CLSID:778C58A9-81B6-11D3-BB8F-00C04FA3471C">
</OBJECT>
<SCRIPT LANGUAGE="VBScript">
    Sub Print()
        If Len(wbp.DefaultPrinterName) = 0 Then
            MsgBox "No default printer!"
            Exit Sub
        End If
        wbp.Header = "My Header"
        wbp.Orientation = 2 ' Landscape
        wbp.Print
    End Sub
</SCRIPT>
</HEAD>
<BODY>
<INPUT TYPE="BUTTON" VALUE="Print" ONCLICK="Print()">
</BODY>
</HTML>

0
 
mgfranzCommented:
Did you create the class object?  

I think you need to read into the MSDN link I provided in more depth... this is not a simple cut and paste code application...
0
 
GaryCommented:
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
Accept Answer by mgfranz
Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
GaryC123
EE Cleanup Volunteer
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now