473,399 Members | 3,888 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Append text to RTF file

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..
Jun 27 '08 #1
1 2987
On May 29, 3:32 pm, Deshi <desh...@gmail.comwrote:
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
Jun 27 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: gukn9700 | last post by:
The following program opens a text file and wants to append new text to it, but everytime I run it, it returns me with "open file fail!". Can anybody help? #include <fstream> #include...
2
by: sm | last post by:
How to "Insert" (not append) new text segment to an existing text file? Assume that we have text file as shown below; Elvis Sofia Kylix BCB--> How to insert here? Atten BuilderX Roma
3
by: Jonathan Buckland | last post by:
Can someone give me an example how to append data without having to load the complete XML file. Is this possible? Jonathan
0
by: | last post by:
Use the method InsertAfter() from the XmlDocument class or AppendChild from XmlNode class. Here is a short example to use InsertAfter(). http://weblogs.asp.net/sonukapoor/articles/132854.aspx ...
3
by: Craig.Lee | last post by:
I am opening a text file with an ODBC connection. I want to append all the text data to a table. Going row by row and field by field takes too long. Does anyone know how I can either reference the...
2
by: Roy Gourgi | last post by:
Hi, How could I append a text file to another text file. Let's say that I have a File1 and I want to append File2 at the end of File1, how would I do that? TIA Roy
3
by: Macca | last post by:
Hi, I am writing some information to a text file using the TextWriter Class. However I am having problems appending data to a file that already exists and already has text in it. I just seem...
2
by: Gaby Sandoval | last post by:
I have this code. The user can read teh record from the text file just fine. They can click the NEXT button and it reads the next record (which is just the next line from the text file). If the...
1
by: wish | last post by:
Hello, I have problem is when i append new data in text file always append at the last of the text file. Am i can append the new data in beginning of the text file? Mean when i have update data...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.