Solved

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

Posted on 2002-07-23
8
567 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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
 
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
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…
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…

724 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