Ms office Oracle Form 6i开场白word文档

Ms office Oracle Form 6i开场白word文档,ms-office,ole,oracleforms,Ms Office,Ole,Oracleforms,我们有一个由其他人在Oracle Forms 6i中构建的程序。表单中有一个函数,当单击按钮时,表单将调用以打开MS Word模板,并将数据库中的数据放入模板中。现在我们迁移到Windows 7和Office 10,Oracle表单不再以MS Word打开模板。没有错误。。。以下是用于启动MS Word的代码: procedure fileopen (fname in varchar2) is arglist ole2.list_type; begin obj_hnd := ole

我们有一个由其他人在Oracle Forms 6i中构建的程序。表单中有一个函数,当单击按钮时,表单将调用以打开MS Word模板,并将数据库中的数据放入模板中。现在我们迁移到Windows 7和Office 10,Oracle表单不再以MS Word打开模板。没有错误。。。以下是用于启动MS Word的代码:

procedure fileopen (fname in varchar2) is
  arglist ole2.list_type;
begin  
   obj_hnd := ole2.create_obj ('Word.Basic');

  arglist := ole2.create_arglist;
  ole2.add_arg (arglist, fname);
  ole2.invoke (obj_hnd, 'fileopen', arglist);
  ole2.invoke(obj_hnd, 'AppShow');
  ole2.destroy_arglist (arglist);
end;

有人知道为什么MS word没有启动吗?我应该研究什么来解决这个问题?在Windows XP下使用MS Word 2003运行表单时没有问题。

我看到您在代码中使用了Word.Basic


我想你应该改用Word.Application。

谢谢。我试过了,但是当我从Word.Basic改为Word.Application时,什么也没发生