2 tables side by side
Hi,
while using Twordapplication, I did tables in a word document. how can
I put 2 tables side by side?
Basic part of program is:
with WordApplication1 do begin
Connect;
Documents.Add(EmptyParam, EmptyParam);
visible := true;
Direction := wdCollapseEnd;
R := ActiveDocument.Range(EmptyParam, EmptyParam);
R.Collapse(Direction);
for i := 0 to 2 do begin
if i = 0 then begin
end
else begin
if i = 1 then begin
Tbl := ActiveDocument.Tables.Add(R, 2, 4);
R := ActiveDocument.Range(EmptyParam, EmptyParam);
R.InsertParagraphAfter;
R.tables.Item(1).cell(1, 1).range.text := '1.';
R.tables.Item(1).cell(1, 2).range.text := '2.';
R.tables.Item(1).cell(1, 3).range.text := '3.';
R.tables.Item(1).cell(1, 4).range.text := '4.';
Tbl.Columns.AutoFit;
end;
if i = 2 then begin
Tbs := ActiveDocument.Tables.Add(R, 2, 2);
R := ActiveDocument.Range(EmptyParam, EmptyParam);
R.InsertParagraphAfter;
R.tables.Item(2).cell(1, 1).range.text := '1.';
R.tables.Item(2).cell(1, 2).range.text := '2.';
Tbl.Columns.AutoFit;
end;
end;
R.Collapse(Direction);
end;
end;
Thank you very much...