locked
how to save contents of two different rich edit box into single rtf file in windows 8.1 app

    Question

  • Developer, I have requirement to save registration data into rtf file.. These can only be done by if I put rich edit box to fill the data.. Now if I am going to write the code for saving the data of different rich edit box into one particular file, it only saves the data of last rich edit box.. So plzz suggest that how can I save the contents of different rich edit box together into one rtf file.
    Monday, February 16, 2015 1:42 PM

Answers

  • Ok Nishant, just did some quick research, since rtf file is unlike txt file, we cannot simply directly write some content to the rtf.

    You can try to find some third party code that can help you insert text into rtf file or you would like to load the content from rtf out to the richeditbox and merge them to one richeditbox and then save back to the file.

    You could like to see how to read/save rtf file sample from: RichEditBox class

    --James


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, February 18, 2015 7:07 AM
    Moderator

All replies

  • Hi Nishant,

    As I know you may need programmatically remove some starting tag also end tag from RTF strings, for instance here is the RTF string, if you want to concat some of them, you may need to remove \rtf tag.

    {\rtf1\ansi
    Hello world!\par
    My {\b bold} text.\par
    }
    

    Furthermore, a better solution you could put the contents into one richeditbox and save it onto the file.

    --James

     

    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, February 17, 2015 3:30 AM
    Moderator
  • Respected sir..Thankx for your kindly reply.And you mean to say that I mainly copy all the contents of different rich edit boxes into one box and then I save that data into file..But sir I can't find out the proper format to display it in file..Firstly I am developing the simple resume building app..Now when users will insert their data..they can get their data into format of resume into one rtf file..So for these I am using different rich edit box for filling their data..and trying to merge all the data in proper format into one rtf file..So how can I do these programmatically in c#..I hope you understand my problem..
    Tuesday, February 17, 2015 6:11 AM
  • Ok Nishant, just did some quick research, since rtf file is unlike txt file, we cannot simply directly write some content to the rtf.

    You can try to find some third party code that can help you insert text into rtf file or you would like to load the content from rtf out to the richeditbox and merge them to one richeditbox and then save back to the file.

    You could like to see how to read/save rtf file sample from: RichEditBox class

    --James


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, February 18, 2015 7:07 AM
    Moderator