Solved

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

Posted on 2002-07-23
8
551 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
Comment Utility
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
Comment Utility
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
Comment Utility
This is only for several users, who will need to print often.
0
 

Expert Comment

by:ansi_c
Comment Utility
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 18

Expert Comment

by:mgfranz
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

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 would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
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…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

763 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

10 Experts available now in Live!

Get 1:1 Help Now