ole2.get_obj_property and ORA-305500
My OLE2 link to MS Word had stopped working from Forms6i.
I'm using a simple example from Metalink:
DECLARE
app ole2.obj_type;
docs ole2.obj_type;
doc ole2.obj_type;
selection ole2.obj_type;
args ole2.obj_type;
BEGIN
app := ole2.create_obj ('Word.Application');
ole2.set_property (app, 'Visible', TRUE);
--
docs := ole2.get_obj_property (app, 'Documents');
doc := ole2.invoke_obj (docs, 'add');
--
selection := ole2.get_obj_property (app, 'Selection');
--
ole2.set_property(selection,'Text','Hello');
--
args := ole2.create_arglist;
ole2.add_arg (args, 'C:\Test.doc');
ole2.invoke (app, 'SaveAs', args);
ole2.destroy_arglist (args);
--
args := ole2.create_arglist;
ole2.add_arg (args, 0);
ole2.invoke (doc, 'Close', args);
ole2.destroy_arglist (args);
--
ole2.RELEASE_OBJ (selection);
ole2.RELEASE_OBJ (doc);
ole2.RELEASE_OBJ (docs);
--
ole2.invoke (app, 'Quit');
END;
I get FRM-40735: WHEN-BUTTON-PRESSED raised unhandled exception ORA-305500 at the following line:
docs := ole2.get_obj_property (app, 'Documents');
I'm working on XP SP2 with MS Word 2002 - all the latest updates.
It works on other workstations!
Where do I look for a solution?
Regards
John Roberts