你如果没有结贴的话,那么就看看下面的内容吧: (多给点分哟!)//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';
I think ,you should Kno how to use delphi connect or open WordApplication; if U not , read some Demos On the line!
用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';
if U not , read some Demos On the line!
VarWord.Application.ActiveDocument.Sections.Item(sn).Range.Tables.Item(page).Cell(hs,ls).select;
VarWord.InsertText(str);