This may not be the proper discussion group for this posting but here goes.
I have converted from Oracle Client server Forms6i to Oracle Web Forms10g2.
I am using the following commands in Oracle Web Forms10g2 to activiate Word, open a document and attach a template.
DECLARE
v_word_app client_ole2.OBJ_TYPE;
v_word_docs client_ole2.OBJ_TYPE;
ls_arg_list client_ole2.LIST_TYPE;
v_word_cur_doc client_ole2.OBJ_TYPE;
BEGIN
l_ole.v_word_app := client_ole2.CREATE_OBJ('Word.application');
l_ole.v_word_docs := client_ole2.GET_OBJ_PROPERTY(l_ole.v_word_app, 'documents');
client_ole2.set_property (l_ole.v_word_app, 'Visible', True);
client_ole2.set_property (l_ole.v_word_app, 'WindowState', 1);
client_ole2.ADD_ARG(ls_arg_list,<FileName>);
client_ole2.ADD_ARG(ls_arg_list,0);
client_ole2.ADD_ARG(ls_arg_list,ole_constants.wdNormalOpen);
l_ole.v_word_cur_doc := client_ole2.INVOKE_OBJ(l_ole.v_word_docs,'open',ls_arg_list);
l_ole.v_word_cur_doc := client_ole2.get_obj_property(l_ole.v_word_app,'activedocument');
client_ole2.set_property (l_ole.v_word_cur_doc, 'AttachedTemplate', <TemplateName>);
client_ole2.RELEASE_OBJ(l_ole.v_word_cur_doc);
client_ole2.RELEASE_OBJ(l_ole.v_word_docs);
client_ole2.RELEASE_OBJ(l_ole.v_word_app);
END;
All this worked fine in Oracle Client server Forms6i but in Oracle Web Forms10g2 the following error is raised:
WU0-712 Unable to set Property: AttachedTemplate; Exception
comm.jacob.com.CommFailException: Invoke of: AttachedTemplate
Source: Microsoft Word
Description: Command Failed
Has anyone come across this and is there an alternative for attaching a template via ole2, other than the command I have used?
Any help with this would be greatly appreciated.
Thanks