M
Mark Davies
I'm trying to do something very simple -- capture the text from a web page.
Can't get it to work. Have scoured the web for info -- no luck
(even/especially MSDN).
Here's what I've tried:
-------------
Added COM reference [Microsoft Internet Controls]
-------------
Public WithEvents wb As SHDocVw.WebBrowser
wb = New SHDocVw.WebBrowser
wb.Visible = False
wb.Navigate("http://www.sitex.com") ' <<<< PROGRAM DIES HERE <<<<<
dim txtFromWebPage as string
txtFromWebPage = wb.Document.Body.innerText
-------------
I get the following at the [wb.Navigate] line (marked above):
An unhandled exception of type 'System.Runtime.InteropServices.COMException'
occurred in Show HTML.exe
Additional information: Unspecified error
Any suggestions???
P.S.:
If I use SHDocVw.InternetExplorer instead of SHDocVw.WebBrowser, it won't
crash at this point, but then I can't figure out how to get the text from
the webpage (objIE.Document.Body.innerText doesn't work).
Can't get it to work. Have scoured the web for info -- no luck
(even/especially MSDN).
Here's what I've tried:
-------------
Added COM reference [Microsoft Internet Controls]
-------------
Public WithEvents wb As SHDocVw.WebBrowser
wb = New SHDocVw.WebBrowser
wb.Visible = False
wb.Navigate("http://www.sitex.com") ' <<<< PROGRAM DIES HERE <<<<<
dim txtFromWebPage as string
txtFromWebPage = wb.Document.Body.innerText
-------------
I get the following at the [wb.Navigate] line (marked above):
An unhandled exception of type 'System.Runtime.InteropServices.COMException'
occurred in Show HTML.exe
Additional information: Unspecified error
Any suggestions???
P.S.:
If I use SHDocVw.InternetExplorer instead of SHDocVw.WebBrowser, it won't
crash at this point, but then I can't figure out how to get the text from
the webpage (objIE.Document.Body.innerText doesn't work).