Click to See Complete Forum and Search --> : code help


mjbnet
May 10th, 2001, 10:07 AM
The following code all gets me to the same point...Which would be the best way to go from a macro in excel so I can then save the opened web page as a text file ? How would the code look if it were to use the IE menu option "File, Save as, Text file. ? Tkx :)

****************************************
'#1
Set IE = New SHDocVw.InternetExplorer
IE.Visible = True
IE.navigate "http://www.barchart.com"
'#2
Set IE = CreateObject("InternetExplorer.application")
IE.Visible = True
IE.navigate "http://www.barchart.com"
'#3
ActiveWorkbook.FollowHyperlink Address:="http://www.barchart.com/", _
NewWindow:=False, AddHistory:=False
****************************************

Iouri
May 10th, 2001, 11:17 AM
Add the Microsoft Internet Transfer control
then write this code

set strvar=inet1.openurl("http://ipaddress/virtual directory /filename

or

strvar=inet1.openurl("c:/path.../filename")

the strvar will contain the contents of the web page..!



Iouri Boutchkine
iouri@hotsheet.com