WordD: TWordDocument; WordD.Tables.Add(WordD.Sentences.Last,2,2,Template,NewTemplate) ; with WordD.Tables.Item(1) do begin
Cell(1,1).Range.Borders.Shadow := False;Cell(1,1).Range.Text:='第一列';
Cell(1,2).Range.Text:='第二列';
end;
设置这个表的边框
Cell(1,1).Range.Borders.Shadow := False;Cell(1,1).Range.Text:='第一列';
Cell(1,2).Range.Text:='第二列';
end;
设置这个表的边框
With Selection.Cells
With .Borders(wdBorderLeft)
.LineStyle = wdLineStyleDashSmallGap
.LineWidth = wdLineWidth450pt
.Color = wdColorAutomatic
End With
With .Borders(wdBorderRight)
.LineStyle = wdLineStyleDashSmallGap
.LineWidth = wdLineWidth450pt
.Color = wdColorAutomatic
End With
With .Borders(wdBorderTop)
.LineStyle = wdLineStyleDashSmallGap
.LineWidth = wdLineWidth450pt
.Color = wdColorAutomatic
End With
With .Borders(wdBorderBottom)
.LineStyle = wdLineStyleDashSmallGap
.LineWidth = wdLineWidth450pt
.Color = wdColorAutomatic
End With
With .Borders(wdBorderHorizontal)
.LineStyle = wdLineStyleDashSmallGap
.LineWidth = wdLineWidth450pt
.Color = wdColorAutomatic
End With
.Borders(wdBorderDiagonalDown).LineStyle = wdLineStyleNone
.Borders(wdBorderDiagonalUp).LineStyle = wdLineStyleNone
.Borders.Shadow = False
End With
Word2000;var
_Cell: Cell;........................
_Cell.Borders.InsideLineWidth := 2;
_Cell.Borders.OutsideLineWidth := 2;......................
WdLineWidth = TOleEnum;
const
wdLineWidth025pt = $00000002;
wdLineWidth050pt = $00000004;
wdLineWidth075pt = $00000006;
wdLineWidth100pt = $00000008;
wdLineWidth150pt = $0000000C;
wdLineWidth225pt = $00000012;
wdLineWidth300pt = $00000018;
wdLineWidth450pt = $00000024;
wdLineWidth600pt = $00000030;