K
Kevin
The following code used to work - a year or two ago.
Sub X()
Dim IE As Object
Set IE = Nothing
Set IE = CreateObject("InternetExplorer.Application")
With IE
.Navigate "http://www.yahoo.com"
Do Until Not .Busy And .ReadyState <> 4
DoEvents
Loop
ReturnURLcontent$ = .Document.Body.innerText
.Quit
End With
Set IE = Nothing
End Sub
Now I get the following error at the ReturnURLcontent$ line.
Run-time error '-2147467259 (80004005)':
Method 'Document' of object 'IWebBrowser2' failed
I've also tried the following.
Sub Y()
Const READYSTATE_COMPLETE& = 4&
Dim IE As Object
Set IE = Nothing
Set IE = CreateObject("InternetExplorer.Application")
With IE
.Navigate "http://www.yahoo.com"
While Not .ReadyState = READYSTATE_COMPLETE
DoEvents
Wend
.Quit
End With
Set IE = Nothing
End Sub
I get the following error after the While Not... line
Run-time error '-2147417848 (80010108)':
Automation Error
The object invoked has diconeccted from its clients.
Any help with be greatly appreciated.
Thanks much.
Sub X()
Dim IE As Object
Set IE = Nothing
Set IE = CreateObject("InternetExplorer.Application")
With IE
.Navigate "http://www.yahoo.com"
Do Until Not .Busy And .ReadyState <> 4
DoEvents
Loop
ReturnURLcontent$ = .Document.Body.innerText
.Quit
End With
Set IE = Nothing
End Sub
Now I get the following error at the ReturnURLcontent$ line.
Run-time error '-2147467259 (80004005)':
Method 'Document' of object 'IWebBrowser2' failed
I've also tried the following.
Sub Y()
Const READYSTATE_COMPLETE& = 4&
Dim IE As Object
Set IE = Nothing
Set IE = CreateObject("InternetExplorer.Application")
With IE
.Navigate "http://www.yahoo.com"
While Not .ReadyState = READYSTATE_COMPLETE
DoEvents
Wend
.Quit
End With
Set IE = Nothing
End Sub
I get the following error after the While Not... line
Run-time error '-2147417848 (80010108)':
Automation Error
The object invoked has diconeccted from its clients.
Any help with be greatly appreciated.
Thanks much.