>
> 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.
_________________________________
There are 2 types of people in the world: