Visual Basic 6.0
Visual Basic 6.0
Convert HTML to Plain Text
Demonstrates how to convert HTML to plain text.Chilkat Visual Basic 6.0 Downloads
' This example requires the Chilkat API to have been previously unlocked.
' See Global Unlock Sample for sample code.
Dim h2t As New HtmlToText
Dim html As String
html = h2t.ReadFileToString("c:/temp/test.html","utf-8")
If (h2t.LastMethodSuccess = 0) Then
Debug.Print h2t.LastErrorText
Exit Sub
End If
Dim plainText As String
plainText = h2t.ToText(html)
If (h2t.LastMethodSuccess = 0) Then
Debug.Print h2t.LastErrorText
Exit Sub
End If
Debug.Print plainText