HTML in a WebBrowser control without a file
Add this code to a Form1:
Option Explicit
Private Sub Form_Load()
Web1.Navigate “about:blank”
End Sub
Private Sub Web1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
Dim doc As HTMLDocument
Set doc = web1.Document
doc.body.innerHTML = “This is really cool I LOVE THE IE DOM!!”
End Sub
It is not working, I get the following error…
“User-defined” type not defined
for this
“Dim doc As HTMLDocument”
Please Advice…
Regards,
Saran
http://www.thesysteminfo.com
Hi,
I also face the same problem..
Thanks
Goto Options > References And Add MSHTML.TLB Kinda File See in System32 Dir Then Run
Dim Doc As New HTMLDocument
…
or u can also
WebBrowser1.DocumentText = RichTextBox1.Text