I’m doing a data conversion from TPS to XLS, and one of the data was written in RTF, and I need to pass it as plain text does anyone know or have done this?
Loc:excel=Tab:RTF that’s all
Pretty sure you can use the GetText method of the RTFControl class.
That would be the best way, even if you don’t display the control.
Might not be high speed, but it works.
I also have used GetText in the past
I then replace CR with CRLF. ie. <13> with <13,10> and I think I have seen other people replacing other characters too.
Ok, thank you all, I’ll post the step by step in case someone needs the same procedure:
1 - Declare a window
2 - Declare a variable Loc:TextRtf to receive the RTF text
3 - Declare an RTF text control in the window
4 - In control properties Use = Loc:text , ,?RTF
5 - Enter Actions and get the name of the control in the class (RTFControlXX)
6 - Use the following code
Get(Tps with RTF field)
Display(?RTF)!(must be here)
In my case I used this in a loop inside a TPS sending the clean text to an Excel spreadsheet.
Thank you all