by Patrick R. Daniel (2 Submissions)
Category: String Manipulation
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Fri 6th April 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)
This code takes a regular string of text and converts it into a basic HTML string to view in a browser (MS Webbrowser Control). I have seen
'--
'-- This blanks the browser...without this line, .write will append
'-- Webbrowser1.Document.Open "text/html", "replace"
'--
'-- Webbrowser1.Document.write TEXT2HTML(strYourTexttoConvert)
'--
Public Function TEXT2HTML(strText As String) As String
Dim strTemp As String
strTemp = "<html><body><Font face=arial size=2>" & _
vbCrLf & _
Replace(strText, vbCrLf, vbCrLf & "<BR>") & _
vbCrLf & _
"</font></body></html>"
TEXT2HTML = strTemp
End Function
No comments have been posted about This code takes a regular string of text and converts it into a basic HTML string to view in a brow. Why not be the first to post a comment about This code takes a regular string of text and converts it into a basic HTML string to view in a brow.