Solved

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

Posted on 2002-07-23
8
556 Views
Last Modified: 2013-11-18
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
Comment
Question by:aklare
8 Comments
 
LVL 18

Accepted Solution

by:
mgfranz earned 50 total points
ID: 7172303
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
 
LVL 19

Expert Comment

by:DreamMaster
ID: 7173752
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
 

Author Comment

by:aklare
ID: 7210546
This is only for several users, who will need to print often.
0
 

Expert Comment

by:ansi_c
ID: 8775227
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 18

Expert Comment

by:mgfranz
ID: 8777505
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
 

Expert Comment

by:ansi_c
ID: 8782439
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
 
LVL 18

Expert Comment

by:mgfranz
ID: 8784097
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
 
LVL 58

Expert Comment

by:Gary
ID: 8845569
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Translate a cURL request to Classic ASP 4 414
API not working 33 55
HTML in email body has extra  tick marks 3 62
Hide row when retrieving data from database 6 53
I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
I made this because I wanted to get e-mail with a attached csv file so I'd would be able to import user input into a MS Excel template, but I also wanted to register/save all inputs from each day in a file on the server. 1st - It creates a temp C…
The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now