Quantcast
Viewing all articles
Browse latest Browse all 3527

Document.Body.innerText 0x800A01B6 error

I have a Visual Basic program that launches a slave copy of Internet Explorer as follows

Browser = CreateObject("InternetExplorer.Application")

The user can then browse documents with it, and subsequently capture the displayed text by clicking on a button my program provides which issues the following command to capture the document text

Dim s As String = Browser.Document.Body.innerText

The text capture always works for the first document. Unfortunately, it almost always fails after the user navigates to a different URL for subsequent text capture attempts, with the following error ...

System.NotSupportedException: Exception from HRESULT: 0x800A01B6 at Microsoft.VisualBasic.CompilerServices.LateBinding.LateGet ...

even though my program's Browser reference is still good after the error is encountered i.e. Browser.Navigate(New_URL) continues to work.

Is there a work around?


Viewing all articles
Browse latest Browse all 3527

Trending Articles