Another way:
Code:Option Explicit Private Sub Form_Load() WebBrowser1.Navigate "www.google.com" End Sub Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant) Dim sHTMLSource As String 'the HTML Dim sHTMLAsText As String 'the text If (pDisp Is WebBrowser1.object) Then sHTMLSource = pDisp.Document.documentElement.innerHTML sHTMLAsText = pDisp.Document.documentElement.innerText Debug.Print sHTMLSource End If End Sub




Reply With Quote