Is there a way to see if the ole object is still connected. I have an issue where MS Word is opened using OLE and if word shuts down abruptly the ole object is still active but if any command is issued using the oleobject then we get an error.
Dave V.
PB2017R3, Office Pro.
Please note in this documentation that the OLERuntimeError object is thrown "...when an OLE error occurs that is not handled by an ocx_error, ExternalException, or Error event script." You can create a new user object inherited from the oleobject standard class - There you can code/handle the Error & ExternalException event scripts.
The OLEObject object provides a GetAutomationNativePointer(unsignedlong) function (returns integer) which the documentation says returns a pointer to the underlying OLE object. I've not used this property, but it might be used to tell you something useful in your case. There is also an IsAlive() property (returns boolean) that determines whether a server object is "defunct". Check out the help for the OLEObject object. Good luck!