免费的Html转rtf方法

    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) 

虽然慢了点但是这是不收费的。

posted @ 2012-04-24 14:48  许阳 无锡  阅读(500)  评论(0编辑  收藏  举报