http://beta.racingpost.com/horses/card_ ... 3&type=sc_
I'm trying to retrieve the whole source page as a text in a cell using the code:
- Code: Select all
Sub testing()
Set ie = CreateObject("InternetExplorer.Application")
ie.Visible = True
TODAYSmeetingsURL = "http://beta.racingpost.com/horses/card_runners.sd?race_id=468886&race_date=2008-11-23&type=sc_"
ie.navigate TODAYSmeetingsURL
Do While ie.Busy: DoEvents: Loop
Do While ie.readyState <> 4: DoEvents: Loop
Sheets("temp").Select
Range("A1").Select
Set mypage = ie.document.body
mydata = mypage.innerText
Sheets("temp").Range("C3") = mydata
End Sub
I get some info with the above but not all the source text.If instead of the "innertext" i use the"innerHTML" i get error.
I dont know if i have to convert the innerHTML into text or anything else and how?
Basically i dont understand many things of these stuff, objects,properties,elements,frames ...
So the question is: how can i download the source behind any(?) web page as text in an excel cell?
Anyone?
Garry you know a lot of VBA, any ideas?