Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
win32ole and printing from ie
Hal E. Fulton
11/9/2004 6:26:00 AM
I'm trying to figure out how to control Internet Explorer and go to
a certain URL and print the page.
The first part is easy.
Printing, I have no clue.
Anyone?
Thanks,
Hal
1 Answer
Carlos Tirado
11/9/2004 1:48:00 PM
0
----- Original Message ---------------
From: Hal Fulton <hal9000@hypermetrics.com>
Date: Tue, 9 Nov 2004 15:26:25 +0900
> I'm trying to figure out how to control Internet Explorer
> and go to a certain URL and print the page.
>
> The first part is easy.
>
> Printing, I have no clue.
>
> Anyone?
This works for me:
#
# use IE, navigate, print
#
url = '
http://www.ruby-lang...
require "win32ole"
ie = WIN32OLE.new('InternetExplorer.Application')
ie.visible = TRUE;
ie.navigate({'url'=>url})
sleep 0.01 while (ie.busy)
script = ie.document.script
printme = script.print();
--
C
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
win32ole and printing from ie
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password