![]() |
Open a TXT file from WEB ?
Hi,
Would anyone know how to open (read), from the VBA, a TXT file which is on the web ? Thank you, Damir |
Open a TXT file from WEB ?
Here is one way of reading the body text of a web page, you can pass the
webtx string looking for the values and related text as required. You need to make a reference to Microsoft Office Object Library. Private sURL As String, webtx As string Private ie As Object Sub WebLink() Set ie = CreateObject("InternetExplorer.Application") sURL = "http://www.xyz..com" ie.Navigate sURL 'wait for response Do Until Not ie.Busy And ie.ReadyState = 4 DoEvents Loop ' get html page body text webtx = ie.Document.body.innertext ie.Visible = True 'close ie and remove memory references ie.Quit Set ie = Nothing End Sub Cheers Nigel "Damir Sudarevic" wrote in message ... Hi, Would anyone know how to open (read), from the VBA, a TXT file which is on the web ? Thank you, Damir |
Open a TXT file from WEB ?
the first thing I would try is workbooks.Open "http://www.mysite.com/myfile.txt" or turn on the macro recorder, and paste the URL to the file in the File=Open dialog and see if excel opens it. -- Regards, Tom Ogilvy "Damir Sudarevic" wrote in message ... Hi, Would anyone know how to open (read), from the VBA, a TXT file which is on the web ? Thank you, Damir |
All times are GMT +1. The time now is 12:07 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com