VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

rtf2html-2.1

Brady Hegberg  (1 Submission)   String Manipulation   Visual Basic 3.0   Unknown Difficulty   Wed 3rd February 2021

This code recieves RTF code as output by a Rich Text Box in VB or MS Word. It outputs the equivalent in HTML. It's in a somewhat BETA form in that it handles a number of but not all of the possible codes. If you encounter a code it doesn't properly convert just send it to me and I'll try to fix the function within 24 hours. I think it does a better job on uncomplicated text than MS Word's HTML conversion.

Inputs
String containing rich text to convert. Note: Currently the input must include the Rich-text header codes otherwise the function will return an empty string.

Assumes
This function may get updated fairly regularly for awhile. Please download the file at the URL below for the latest version: rtf2html.zip Here's an example of how to use the function with a rich text box (Note that the function also be used with rich text files.) TextBoxHTML.Text = (RTF2HTML(TextBoxRTF.TextRTF))

Returns
String containing HTML code.

API Declarations
None

Rate rtf2html-2.1 (4(4 Vote))
rtf2html-2.1.bas

rtf2html-2.1 Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters