I needed a program to convert some RTF files to plain text I seen a few but they did not do what I wanted however I decided to make my own little function. This code will take in a input RTF file and convert it to plain text as this is all I really wanted.
If I have time I try and make a proper GUI for this function.
Anyway use the code as you like hope it be of some use, Comments and suggestions welcome..
Public Class Form1
Private Function rtf2txt(ByVal Source As String, ByVal Output As String) As Boolean
Dim rbox As New RichTextBox()
Dim sb As New StringBuilder()
Dim sw As StreamWriter
If Not File
'Open richtext source file.
'Append text to string builder.
'Create new output file.
sw = New StreamWriter(Output)
'Write plain text
sb = Nothing
Catch ex As Exception
'Return good result.
Private Sub cmdConvert_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdConvert.Click
Dim Done As Boolean = rtf2txt("C:\out\data\Document.rtf", "C:\out\data\Document.txt")
'Just show user if convert was done ok.
MessageBox.Show("Convert ok = " & Done.ToString(), "rtf2txt", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)