Ok, a trivial change will fix that:
Code:
 
$sInputFile=".\demo.txt"
$sOutputFile=".\demo.csv"

$fdInputFile=FreeFileHandle()
If Open($fdInputFile,$sInputFile)
"Cannot open file"+$sInputFile+"' for input"+@CRLF
"Reason: ["+@ERROR+"] "+@SERROR+@CRLF
Exit @ERROR
EndIf

If Exist($sOutputFile) Del $sOutputFile EndIf

$fdOutputFile=FreeFileHandle()
If Open($fdOutputFile,$sOutputFile,4+1)
"Cannot open file"+$sOutputFile+"' for output"+@CRLF
"Reason: ["+@ERROR+"] "+@SERROR+@CRLF
Exit @ERROR
EndIf

$sIn=ReadLine($fdInputFile)
While Not @ERROR
; Catenate line, fix speech marks to braindead MS csv style
If $sIn <> "" $sOut=$sOut+',"'+Join(Split($sIn,'"'),'""')+'"' EndIf
If InStr($sIN,"FAX: ")==1 $=WriteLine($fdOutputFile,SubStr($sOut,2)+@CRLF) $sOut="" EndIf
$sIn=ReadLine($fdInputFile)
Loop

If $sOut <> "" $=WriteLine($fdOutputFile,SubStr($sOut,2)+@CRLF) $sOut="" EndIf

$=Close($fdInputFile)
$=Close($fdOutputFile)

Exit 0



Now you have CSV records which break whereever there is a FAX line.

However, you have much bigger problems.

The file is not a fixed format, so it is not possible to determine how many lines there are in the address, or where to find the post code, city or other information.

If you can fix the number of lines for each record, or prefix the data with a sentinel string then it can be done otherwise you are stuffed.

It is further complicated because the KiXtart ReadLine() API does not differentiate between carriage returns and CRLF - both are considered to be end of line strings and both are silently dropped. This means that if your "address" is actually a single line with embedded carriage returns it will be parsed as multiple single lines.