By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,158 Members | 1,364 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,158 IT Pros & Developers. It's quick & easy.

About formatting text in a saved textfile

P: n/a
Hi!

In my application I save text from a RichText box to file, but when
previewing the text it turns out like:

{\rtf1\ansi\ansicpg1252\deff0{\fonttbl{\f0\fnil\fc harset0 Verdana;}}
\viewkind4\uc1\pard\lang1033\f0\fs24 2006-04-03\par
\par
________________\par
\par
_______12:08________\par
Ok. What is this?\par
}

and this is really not what I want.

Here's the code:

string myFile = "C:\\GSB\\" +
monthCalendar1.SelectionStart.ToShortDateString() + ".rtf";
if (File.Exists(myFile) == false)
{
reSkriv.SaveFile(myFile, RichTextBoxStreamType.RichText);

}

So is there a trick to avoid saving the formatting with the text?

Have tried the different alternatives in the RichBoxStreamType but no
ones seems to avoid saving the formatting text. Makes me crazy, because
when I open these saved textfiles in wordpad or word the formatting is,
of course, gone.

Hope anybody can give me a tip!

Me.Name

Apr 3 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.