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. Advertising

  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. Advertising

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. sm
    Replies:
    2
    Views:
    571
    Rolf Magnus
    Apr 29, 2005
  2. HYRY
    Replies:
    10
    Views:
    631
    Bruno Desthuilliers
    Sep 26, 2007
  3. Stef Mientki

    extracting plain text from RTF-file ?

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

    Reading RTF + Text File and pattern matching

    Sukhwinder Tambar, Jan 12, 2009, in forum: Ruby
    Replies:
    2
    Views:
    160
    Sukhwinder Tambar
    Jan 15, 2009
  5. Tony
    Replies:
    2
    Views:
    312
Loading...

Share This Page