Append text to RTF file

Discussion in 'ASP .Net' started by Deshi, May 29, 2008.

  1. Deshi

    Deshi Guest

    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..
     
    Deshi, May 29, 2008
    #1
    1. Advertisements

  2. Deshi

    Munna Guest

    On May 29, 3:32 pm, Deshi <> wrote:
    > 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
     
    Munna, May 29, 2008
    #2
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dilantha Seneviratne

    How to append to a text file

    Dilantha Seneviratne, Jan 5, 2004, in forum: Java
    Replies:
    10
    Views:
    10,131
    Andrew Thompson
    Jan 9, 2004
  2. Rach
    Replies:
    3
    Views:
    14,569
    Malcolm Dew-Jones
    Aug 24, 2004
  3. gukn9700

    Can I append text to a file?

    gukn9700, Jul 16, 2003, in forum: C++
    Replies:
    2
    Views:
    5,873
    gukn9700
    Jul 17, 2003
  4. sm
    Replies:
    2
    Views:
    724
    Rolf Magnus
    Apr 29, 2005
  5. HYRY
    Replies:
    10
    Views:
    834
    Bruno Desthuilliers
    Sep 26, 2007
  6. Stef Mientki

    extracting plain text from RTF-file ?

    Stef Mientki, Apr 7, 2009, in forum: Python
    Replies:
    0
    Views:
    353
    Stef Mientki
    Apr 7, 2009
  7. Sukhwinder Tambar

    Reading RTF + Text File and pattern matching

    Sukhwinder Tambar, Jan 12, 2009, in forum: Ruby
    Replies:
    2
    Views:
    258
    Sukhwinder Tambar
    Jan 15, 2009
  8. Tony
    Replies:
    2
    Views:
    480
Loading...