从网上搜索到一个方法。记录在这里。
Dim ws As WebBrowser
Dim doc As HtmlDocument
ws = NewWebBrowser
ws.DocumentText = "Hello World"
doc = ws.Document.OpenNew(True)
sContent = "<html><body>...</body></html>"
doc.Write(sContent)
之后doc就是一个标准的HTML页面的document对象了,可以使用GetElementById或者GetElementByTagName之类的函数读取解析HTM页面内容。