Using XE7 with WPTools 7.21
In a RTF document, I need to replace some code (sort of my own mailmerge implementation) with plain text that contains CrLf pairs.
Here is what I am using, and it does not work
Code
const
gCRLF = #13#10;
var
sTx: String;
sTx := 'Line ONE'#$D#$A'Another line.' // This is how it looks in the debug window
sTx := StringReplace(sTx, gCRLF, ''#$A'', [rfReplaceAll, rfIgnoreCase]);
WPRtf1.Finder.ToStart;
while WPRtf1.Finder.Next('[' + sCodAct + ']') do
WPRtf1.Finder.FoundText := sTx;
WPRtf1.ReformatAll(false, true);
Alles anzeigen
In either case, letting CrLf as is or replacing with Lf, activating the view of control chars in the RTF editor, it apears a broken arrow, and I cannot access the first character of the second line.