Hello
I want to export the contents of a TRichViewEdit into an RTF and then load the RTF into FastReport.
Everything works fine except that the BackColor-property of the text styles do not show in FastReport.
The strange thing is:
When I open the exported RTF in Word, the BackColor is there!! And when I simply save the same RTF from Word and THEN import it in FastReport, the background color is suddenly OK.
So what is the difference between an RTF directly exported from TRichViewEdit and an RTF that is "re-saved" in Word?
If I can just get the BackColor to export the same way as Word exports it, I will be happy.
Thanks for any suggestions!
Marco
RTF and BackColor
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Hi Sergey
Thanks for looking into it. After analyzing the RTF differences between RichView output and Word output I found a solution!
Microsoft uses the \highlight tag which is evidently interpreted correctly in FastReport. So now I use the SaveRTFExtra event of RichViewEdit to insert \highlight tags in the right positions. I do have to use a trick to make the whole thing work with the color table. But now it works like a charm! If anyone needs the code just contact me.
Keep up the great work on RichView!!!
Marco
Thanks for looking into it. After analyzing the RTF differences between RichView output and Word output I found a solution!
Microsoft uses the \highlight tag which is evidently interpreted correctly in FastReport. So now I use the SaveRTFExtra event of RichViewEdit to insert \highlight tags in the right positions. I do have to use a trick to make the whole thing work with the color table. But now it works like a charm! If anyone needs the code just contact me.
Keep up the great work on RichView!!!
Marco