>Can you trap this error with your regular error handler?
>
>Joe
>
Actually, I did a bit more research after posting and found a thread from
Jan. 11, 1999, 'How to detect a dead object'. This is one of those that a
regular error handler doesn't work well on. Also, TYPE("owordobj") returns "O" even if the Word server was killed, and ISNULL doesn't work either.
Jim Booth's solution is to check a known property of the object and this works great. TYPE("owordobj.name") = "C" returns .t. if the word server is still alive, and false if it was killed or otherwise died . This works for references to Word docs too.
D. Frankenbach suggested trapping the error in the error method of the class, and Hacker's Guide has an example. In the error method, you can check for
nError = 1427 or 1429 which are Ole errors, and handle things from there.
Thanks,
Rod Poujade
Montreal, Canada
Rod Poujade