Hi all,
is there a function, lib or code to merge several RTFs into a single RTF file ?
Thank you.
Merge rtf
- Marco Turco
- Posts: 858
- Joined: Fri Oct 07, 2005 12:00 pm
- Location: London
- Contact:
Merge rtf
Best Regards,
Marco Turco
SOFTWARE XP LLP
Marco Turco
SOFTWARE XP LLP
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Merge rtf
Marco,
You could use two richedit controls. I got the idea from here:
http://stackoverflow.com/questions/6285 ... -rtf-files
You could use two richedit controls. I got the idea from here:
http://stackoverflow.com/questions/6285 ... -rtf-files
Code: Select all
RichTextBox rtbTemp = new RichTextBox();
RichTextBox rtbMerged = new RichTextBox();
string Merge(string s1, string s2)
{
rtbTemp.Rtf = s1;
rtbTemp.SelectAll();
rtbTemp.Cut();
rtbMerged.Paste();
rtbMerged.AppendText(Environment.NewLine);
rtbMerged.AppendText(Environment.NewLine);
rtbTemp.Rtf = s2;
rtbTemp.SelectAll();
rtbTemp.Cut();
rtbMerged.Paste();
return rtbMerged.Rtf;
}
- Marco Turco
- Posts: 858
- Joined: Fri Oct 07, 2005 12:00 pm
- Location: London
- Contact:
Re: Merge rtf
Interesting, I will try thank you,
anyway I think this way the RTF code will be converted into a WordPad standard so many advanced RTF information (using Word or OpenOffice) would be lost.
anyway I think this way the RTF code will be converted into a WordPad standard so many advanced RTF information (using Word or OpenOffice) would be lost.
Best Regards,
Marco Turco
SOFTWARE XP LLP
Marco Turco
SOFTWARE XP LLP
Re: Merge rtf
Hi ,
I have an idea.
Open the first RTF file with word and insert the other RTF at the end of the first document.
At the end, you save the file .
Why not ?
I have an idea.
Open the first RTF file with word and insert the other RTF at the end of the first document.
At the end, you save the file .
Why not ?