Append text to RTF file

D

Deshi

Hi,.

I am trying to append text into the RTF file, nothing seems to be
working for me... here is the code

FileStream fs = new FileStream("c:\\djj.rtf", FileMode.Append,
FileAccess.Write);
StreamWriter sw = new StreamWriter(fs);
sw.WriteLine("Appending this text at the end of the file");
sw.Close();
fs.Close();

it works well with the normal text file but not for RTF, does anyone
know how to append text at the end of the RTF file..
 
M

Munna

Hi,.

I am trying to append text into the RTF file, nothing seems to be
working for me... here is the code

FileStream fs = new FileStream("c:\\djj.rtf", FileMode.Append,
FileAccess.Write);
StreamWriter sw = new StreamWriter(fs);
sw.WriteLine("Appending this text at the end of the file");
sw.Close();
fs.Close();

it works well with the normal text file but not for RTF, does anyone
know how to append text at the end of the RTF file..

Hi heshi

checkout this article

http://www.codeproject.com/KB/string/nrtftree.aspx

Munna
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top