Excellent! Thank you. -----Original Message----- From: Masaki Suketa [mailto:masaki.suketa / nifty.ne.jp] Sent: maandag 20 september 2010 13:50 To: ruby-talk ML Subject: Re: check if Win32OLE still available On Mon, Sep 20, 2010 at 06:02:43PM +0900, Reinhart Viane wrote: > This is the error: > > Error: #<WIN32OLERuntimeError: unknown property or method `ActiveSelection' > HRESULT error code:0x800706ba > The RPC server is unavailable. > > Where can I find more info on that catching? http://rubylearning.com/satishtalim/ruby_exceptions.html > Is it possible to use in a if clause (to let the script continue or go to > another script)? No. You must use begin rescue end to catch WIN32OLERuntimeError exception. If you want to let the script continue, write the script like following. is_ok = true begin obj.ActiveSelection rescue WIN32OLERuntimeError is_ok = false end if (is_ok) ... continue script non exception occurred. else ... continue script when WIN32OLERuntimeError occurred. end Regards, Masaki Suketa