Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: Printing using the ActiveX-Control "InternetExplorer.Application"


Message #1 by "Volker Schröder" <volker.schroeder@t...> on Fri, 9 Aug 2002 09:37:25
For your information I had a long discussion with Jerry Mead, the writer of 
ScriptX about how to do this and the conclusion was it cannot be done. This 
is given the fact you only want to use components already on the system.
The only thing I could think of would be to change default printer settings 
via registry and then start a new instance of IE in a different process 
space using WScript.Shell. You could then grab this instance and automate it 
to print your page.

Joe


>From: "Volker Schröder" <volker.schroeder@t...>
>Reply-To: "javascript" <javascript@p...>
>To: "javascript" <javascript@p...>
>Subject: [javascript] Printing using the ActiveX-Control 
>"InternetExplorer.Application"
>Date: Fri, 9 Aug 2002 09:37:25
>
>Hello,
>I'm trying to print out a web page in an intranet-application we are
>developping. The printing itself works without problem, but I need to set
>the orientation to "landscape". Using InternetExplorer >=5.5 I can set
>this in the registry-key HKCU/Software/M$/IE/PageSetup/orientation.
>But this key is ignored by IE 5.0. IE 5.0 reads these settings out of the
>DefaultPrinter settings on startup.
>I found, there is a parameter OLECMDID_PAGESETUP for the Method ExecWB of
>the "InternetExplorer.Application"-ActiveX-Control. Further I found, that
>this can be used to pop up the PageSetup Dialog - which I don't want to
>appear....
>Now I'm wondering, if this function can be used in the form
>myIEactiveX.ExecWB(OLECMDID_PAGESETUP, OLECMDEXECOPT_DONTPROMPTUSER,
>someCommandAnyIdea, dontcare);
>to directly set it to landscape-paperorientation.
>Does anybody have seen or done anything in this respect?
>
>just to mention, I am not allowed to use any ActiveX-Control I'd have to
>install like e.g. ScriptX, which I'm sure can do this job quite easily.
>
>Volker
>
>---
>
>Improve your web design skills with these new books from Glasshaus.
>
>Usable Web Menus
>http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
>r-20
>Constructing Accessible Web Sites
>http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
>r-20
>Practical JavaScript for the Usable Web
>http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
>r-20




_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com


  Return to Index