各位DELPHI高手,我现在有一个很急手的问题,就是我想把我刚从数据库里查找
出来的数据导入到WORD中,我不知道如何实现这个技术,请各位高手各显神通一下呀!!回复可行,立给分!!!!

解决方案 »

  1.   


    用Word自动化对象应该可以,你可以看一下这方面的资料
      

  2.   

    在DELPHI的simple上有专门的控件(Wordapplication)
      

  3.   

    你如果没有结贴的话,那么就看看下面的内容吧: (多给点分哟!)//if you want use table in word,u must declare a table in word.
    //just like this.vTable: Table;//declare the table u want use in Word;WordApplication.activedocument.tables.add(wordappliction.activedocument.rang,row_count,Col_count,,)
    { you can get the rest two parameters when u type the left quote  in Delphi Unit during ur promgraming!}//then u use the table to add the data from database to word document;//just like this:
    vTable:=wordApplication.activedocument.tables.items(0) ;
    vTable.cells(row,col).range.text:='string';
      

  4.   

    I think ,you should Kno how to use delphi connect or open WordApplication;
    if U not , read some Demos On the line!
      

  5.   

    用ole技术。   
    VarWord.Application.ActiveDocument.Sections.Item(sn).Range.Tables.Item(page).Cell(hs,ls).select;
       VarWord.InsertText(str);