Convert a RTF to string?

bonedoc

Well-known member
Joined
May 4, 2006
Messages
112
Programming Experience
Beginner
I am trying to convert the text of a RTF file to a string. When I do it with a file stream, all the RTF characters are all over the place. So, I decided to just open the doctument in a RichTextBox. Well, this works, but all of the Tabs are gone. In fact, I dont believe the NewLines are even new lines in the RichTextBox. So,

1. Is there a way to create a string from a RTF file stream?
2. If not, what does a RichTextBox call a "NewLine" or "Tab"? If I could searcg for these, I would just add more..but dont know what they are called.
 
Ok, I foubd thata rhe RTB was usinf Chr(10) to create the new line. But, bfor the life of me, I cannot get it to add a Tab. I have tried vbTab and Chr(9).....nothing.
 
Both vbTab and Chr(9) worked when I tested. What's your code?
When loading the file/stream, did you use the LoadFile method? did you specify a source type? It sounds as you didn't since your seeing rtf codes.
 
Back
Top