Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open a file on the www in Access

Status
Not open for further replies.

SaRiD

Programmer
Apr 19, 2003
45
Hi

Is there some way of reading a file on the internet into VBA in Access?

I have a local database and I want to be able to specify a certain web page on the net which will then download autmaticly and then run som checks over the contents of the HTML file. I would probably do this line by line.

Any ideas?

The function:
Open "textfile.txt" As Input #1

Is really want I want to do, but to be able to get the file off the net
 
Sorry never mind. I just need to look for another 5 minutes.

The following is good.

Code:
Dim objXMLHTTP As Object
Dim strReturn As String
Dim strURL As String

strURL = "[URL unfurl="true"]http://www.webpage.com/index.html"[/URL]

Set objXMLHTTP = CreateObject("Microsoft.XMLHTTP")

objXMLHTTP.Open "GET", strURL, False
objXMLHTTP.Send

strReturn = objXMLHTTP.responseText
Set objXMLHTTP = Nothing

Debug.Print strReturn
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top