全部博文(788)
分类:
2009-02-19 17:03:24
uses
Word2000;
var
_Cell: Cell;
Idx: Integer;
Row: Integer;
Col: Integer;
begin
...........
ADOQuery.Open;
for Row := 1 to ADOQuery.RecordCount do
begin
for Col := 1 to ADOQuery.FieldCount do
begin
_Cell := WordDocument.Tables.Item(Idx).Cell(Row, col);
_Cell.Range.Text := ADOQuery.Fields[Col -1].Value;
end;
ADOQuery.Next;
end;
.............