I try to write down the result of the POI unit test at: code here, by adding the line
daDoc.write(new FileOutputStream("C:\\wordtest.doc"));
to the end of the method testRangeReplacementAll. The new document is corrupt when I try to open it with word 2003.
Any suggestions to fix this?