|We don't bite newbies here... much|
Re: Problem using Win32::OLE with MS Wordby Trix606 (Monk)
|on Nov 11, 2005 at 04:06 UTC||Need Help??|
I tried jplindstrom's solution but could not get eval to trap the error.
This calls the Found method on the synonyms object before trying to access the SynonymList.
Update: Modified program to handle missing thesaurus. After seeing Discipulus' post I tried the Italian thesaurus which caused the program to fail because I don't have the Italian thesaurus DLL installed.
Basically you're ignoring the error from OLE (Win32::OLE->Option(Warn => 0)) and checking for it yourself with Win32::OLE->LastError().
Note that the last line resets things so you'll get any subsequent OLE errors.
Update: Added comments to highlight <c>Win32::OLE->Option<c/> use. Changed last line to reset to default setting for OLE Errors.
Now attempting to move on. :)