pagego Posted October 8, 2003 Posted October 8, 2003 I have a program in which I use several writelines to save richtext strings to a .txt file in this manner: richtext string 1 regular text string 1 richtext string 2 regular text string 2 ... However it saves like this: rich text string 1 regular text string 1 rich text string 2 regular text string 2 ... Then it of course reloads it in this manner, one line at a time and messes with my string arrays. How can I fix this without using multiple files?? Thanks in advance for your help Quote
*Experts* mutant Posted October 8, 2003 *Experts* Posted October 8, 2003 Could you show the actual code you are using to write it to the file? :) Quote
pagego Posted October 8, 2003 Author Posted October 8, 2003 dim mywriter as io.streamwriter mywriter = system.io.file.createtext(myfile) mywriter.writeline(richtextbox.rtf) mywriter.writeline(richtextbox.text) The text is saved in a string array but this is basicly it. Thanks Quote
*Experts* mutant Posted October 8, 2003 *Experts* Posted October 8, 2003 Are you saying that the rtf breaks into couple lines but you want to write into a single line using WriteLine? If there are new lines in the rtf it will be carried over to the next line. Quote
*Experts* Volte Posted October 8, 2003 *Experts* Posted October 8, 2003 If the RTF is on multiple lines it will be stored as such. To remove the newlines, try this: mywriter.writeline(richtextbox.rtf.Replace(ControlChars.CrLf, "")) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.