PROCEDURE WaitForFile(tcFile) LOCAL lnUntil, lnPrevLen, lnCurLen, h, l, lnInterval DECLARE Sleep IN kernel32 INTEGER dwMilliseconds *-- give it max 30 seconds into the future lnUntil=SECONDS()+30 lnPrevLen=-2 lnCurLen=-1 lnInterval=500 *-- assume that whatever writes to a file will do so at least twice a second: DO WHILE lnPrevLen#lnCurLen AND SECONDS()<lnUntil Sleep(lnInterval) h=FOPEN(tcFile,10) IF h>0 *-- zero length doesn't count, still open by creator lnPrevLen=IIF(lnCurLen>0, lnCurLen, lnPrevLen) lnCurLen=FSEEK(h,0,2) FCLOSE(h) lnInterval=100 && once it exists, check more often ENDIF ENDDO l=lnPrevLen=lnCurLen RETURN lIt should return .t. if the file length stayed the same non-zero length in two consecutive measurements. Not sure whether it's fullproof, some software may close the file at some point, then reopen it to add more, and this would then exit prematurely. Works for me, with Word.