Well I guess that is the question then. Why isn't the ERASE not generating an error? It fails to erase the file because the file is in use by another user. When I run the program on my Win3k machine the ERASE does generate an error as I would expect.
>>
>> try
>> erase (lcSecondDoc)
>> if file(lcSecondDoc)
>> wait window 'Erase clearly failed because the file still exist! Catch should fire.'
>> endif
>> catch
>> wait window 'Document in use'
>> .ActiveDocument.close(0)
>> .application.quit
>> oWord = .null.
>> release oWord
>> llReturn = .t.
>> endtry
>>
>
>Robert,
>
>The CATCH in this case is not firing because no error has occurred (according to Fox). Move your ERASE out of the TRY/CATCH and you will see that no error is generated. The ERASE command does not generate errors. If you want to catch an error for this, you could put an ERROR command or THROW command where your WAIT WINDOW is.