RichTextBoxStreamType.PlainText Does not work.
-
Hi All. In my rich text editor everything's finished except for one thing. I want the user to be able to save the file as EITHER RTF or TXT. But when I use this:
Rtb.SaveFile(Sf.FileName, RichTextBoxStreamType.PlainText);
... It never works. The next time they open the TXT file it opens but with all the RTF formatting codes in it which makes the file ugly and unreadable and unacceptable. Does anybody know how I can fix this, or know of any other ways to do this. I have tried doing this also, but doesn't always work:
string text = Rtb.Text;
File.WriteAllText(Sf.FileName, text);I have been to MSDN and Google and there's a whole lot of junk on Google with no solutions. (Btw, I'm beginning to favor Microsoft's new search: Bing over Google nowadays). I'm completely baffled as to why the PlainText option does not work. Any thoughts? Anyone? regards, jase
-
Hi All. In my rich text editor everything's finished except for one thing. I want the user to be able to save the file as EITHER RTF or TXT. But when I use this:
Rtb.SaveFile(Sf.FileName, RichTextBoxStreamType.PlainText);
... It never works. The next time they open the TXT file it opens but with all the RTF formatting codes in it which makes the file ugly and unreadable and unacceptable. Does anybody know how I can fix this, or know of any other ways to do this. I have tried doing this also, but doesn't always work:
string text = Rtb.Text;
File.WriteAllText(Sf.FileName, text);I have been to MSDN and Google and there's a whole lot of junk on Google with no solutions. (Btw, I'm beginning to favor Microsoft's new search: Bing over Google nowadays). I'm completely baffled as to why the PlainText option does not work. Any thoughts? Anyone? regards, jase