Deleting empty lines

  • Hi,
    my problem is:
    how can I delete empty lines in a text.
    I tried this:

    Code
    repeat
                if trim( eLetter.CPLine)='' then
                begin
                  if not eLetter.FastDeleteLine then
                    eLetter.CPMoveUpLine;  
                end;
              until not eLetter.CPMoveDownLine;

    It works fine for empty lines that end with $D$A (CR/LF) but not if the line ends with $A (only LF).
    Can you help me on this?

    best regards
    falko