I'm using a WebBrowser control to get the HTML code of a webpage. But, right now it only returns me the contents of the body. How can I also grab the head content (I want to javascript too).

This is what I do now: (wbWeb is my WebBrowser control, and strhtml is the web page HTML I want)



wbWeb.Navigate(psURL)

Do While wbWeb.ReadyState <> 4 '= READYSTATE_COMPLETE
Application.DoEvents()
Sleep(500)
Loop

strhtml = wbWeb.Document.body.outerhtml




Any help is appreciated! Thanks in advance!