WIN32OLE InternetExplorer SaveAs command

D

Derek Haskin

I've been trying to use the WIL32OLE to call the
InternetExplorer.ExecCommand SaveAs command.
I've been able to get it to work in the interface mode
where it displays a dialogue browser to save the file,
but have been unable to get it to work in
non-interface mode where you pass it the file to save
to.


Following is an extract of the code I am using.

require 'win32ole'
ie =3D WIN32OLE.new('InternetExplorer.Application')
ie.visible =3D true

myUrl =3D "http://www.google.com"

ie.navigate myUrl
sleep 1

ie.document.execCommand("SaveAs",false,"C:\\derek\\myFile.htm")


__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around=20
http://mail.yahoo.com=20
 
W

William James

Derek said:
I've been trying to use the WIL32OLE to call the
InternetExplorer.ExecCommand SaveAs command.
I've been able to get it to work in the interface mode
where it displays a dialogue browser to save the file,
but have been unable to get it to work in
non-interface mode where you pass it the file to save
to.


Following is an extract of the code I am using.

require 'win32ole'
ie = WIN32OLE.new('InternetExplorer.Application')
ie.visible = true

myUrl = "http://www.google.com"

ie.navigate myUrl
sleep 1

ie.document.execCommand("SaveAs",false,"C:\\derek\\myFile.htm")


http://groups.google.com/group/comp.lang.ruby/tree/browse_frm/thread/1022e957a1233e23/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top