Dim reportWebBrowser As New WebBrowser
reportWebBrowser.CreateControl()
reportWebBrowser.DocumentText = sbHTMLDoc.ToString
While reportWebBrowser.DocumentText <> sbHTMLDoc.ToString
Application.DoEvents()
End While
reportWebBrowser.Document.ExecCommand("SelectAll", False, Nothing)
reportWebBrowser.Document.ExecCommand("Copy", False, Nothing)
Dim reportRichTextBox As New RichTextBox
reportRichTextBox.Paste()
reportRichTextBox.SaveFile(DocumentFileName)
虽然慢了点但是这是不收费的。