Results 1 to 2 of 2

Thread: convert text file to rich text

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Dec 2003
    Posts
    91

    convert text file to rich text

    I'm working on a project to help people who wrote papers, etc... on a mac with the word processor PAGES convert it to another USABLE format.

    http://sourceforge.net/projects/pagesconvert/

    It's open source; right now I have only gotten so far as to convert it into a text file.

    Basically, I look through an XML file for formatting and would like to convert certain strings into a certain color, or bold, etc... Essentially, this would force me to convert text into rich text. I don't mind saving the format as .rtf (actually, that is preferred).

    Can someone help me? Also, look at the tasks and see if you can help me out anywhere else!
    http://sourceforge.net/pm/task.php?g...14&func=browse


    Thanks!!

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: convert text file to rich text

    Either you need to read up on the RTF file format and then insert the appropriate markup into a String that contains your plain text, or you need to load the file into a RichTextBox and use its members to apply the appropriate formatting to the text and then call its SaveFile method to save to an RTF file. There are plenty of existing threads on the forum about using the RichTextBox but, if you want to go that way, I'd suggest a thorough read of the MSDN documentation for the class to start with.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width