You need to extract line after line in a loop over all paragraphs. (par := FirdstPar; wile par <> nil ... )
In this loop use the TParagraph Method GetAllText:
{:: This function reads the text of this paragraph or cell and of
all sub paragraphs, i.e. paragraphs in a multi line cell.
The paragraphs are seperated by #13#10 codes. }
function GetAllText(ObjectSymbol: Boolean = FALSE;
NumberText: Boolean = FALSE): WideString;
str:=TWPStringBuilder.Create; par:=DBWPRichText3.FirstPar; while par<>nil do begin str.Append(par.GetAllText(false,true)); str.Append(#13#10); par:=par.next; end;
One possible alteration.
I've been doing something similar to write out text files where the lines were a fixed width.
Like this:
str:=TWPStringBuilder.Create;
par:=DBWPRichText3.FirstPar;
while par<>nil do begin
for i:=0 to par.LineCount-1 do begin
str.Append(par.GetLineText(i);
str.Append(#13#10);
end;
par:=par.next;
end;
Any way to combine the two so I can have my fixed width lines with the numbers?