我的语句如下  
  编译时在wa.documents.open处  
  报[error]   nsfmain.pas(685):   not   enough   actual   parameters  
   
  可是我把整个工程放到我同学的机器上编译  
  正常通过  
  执行正常  
  奇怪!  
   
  为什么?  
  怎么解决?  
   
  我和我同学装的都是delphi7  
   
   
      try  
          wa.connect;  
      except  
          statusbartext(浏览申请书,   启动word失败,请先安装microsoft   word);  
          abort;  
      end;  
   
      {open   document}    
      filename   :=   tempfilename;  
      confirmconversions   :=   false;  
      readonly   :=   true;  
      addtorecentfiles   :=   false;  
      passworddocument   :=   ;  
      passwordtemplate   :=   ;  
      revert   :=   true;  
      writepassworddocument   :=   ;  
      writepasswordtemplate   :=   ;  
      format   :=   wdopenformatauto;  
      encoding   :=   ;  
      visible   :=   true;  
      //wa.documents.open(filename,   confirmconversions,   readonly,   addtorecentfiles,  
      //                                     passworddocument,   passwordtemplate,   revert,   writepassworddocument,  
      //                                     writepasswordtemplate,   format,   encoding,   visible);  
   
      //assign   worddocument   component  
      itemindex   :=   1;  
      wd.connectto(wa.documents.item(itemindex));  
   
      //turn   spell   checking   of   because   it   takes   a   long   time   if   enabled   and   slows   down   winword  
      wa.options.checkspellingasyoutype   :=   false;  
      wa.options.checkgrammarasyoutype   :=   false;  
   
      //display   word   application  
      wa.visible   :=   true;


网友回答:
网友:moeryang

参数不够  
  试着窗入一个空的参数看看  
   
  还   你们的word是一个版本吗

网友:iorili

参数不够,

网友:seace

在xp里是15个参数  
  word2000里是12个参数  
   
  你和同学的区别可能在于  
  你同学安装delphi时office控件选的是for   2000  
  你装的是for   xp  

posted on 2008-03-01 09:27  恩恩爸爸  阅读(3387)  评论(1编辑  收藏  举报