- Offizieller Beitrag
ZitatWhats the best way to work through the RTF data and extract it line by line to be processed (I need to load each line up to (not including) a soft / hard return, and then continue to the next).
This code will break up the text into the parts:
Code
var par : TParagraph;
i, j : Integer;
s : string;
begin
par := WPRichText1.FirstPar;
while par<>nil do
begin
i := 0;
j := 0;
while i<par.CharCount do
begin
if par.CharItem[i]=#10 then
begin
s := par.GetSubText(j, i-j);
ShowMessage(s);
j := i+1;
end;
inc(i);
end;
if j<i then
begin
s := par.GetSubText(j, i-j);
ShowMessage(s);
end;
par := par.next;
end;
end;
Alles anzeigen
Julian
[/quote]