var
VTable: Variant;
begin
VTable := MyWord.ActiveDocument.Tables.Item(1);
//表格左边框
VTable.Borders.item(wdBorderLeft).LineStyle := WdLineStyleSingle;
VTable.Borders.item(wdBorderLeft).LineWidth := wdLineWidth150pt;
VTable.Borders.item(wdBorderLeft).Color := wdColorRed;
//表格右边框
VTable.Borders.item(wdBorderRight).LineStyle := WdLineStyleSingle;
VTable.Borders.item(wdBorderRight).LineWidth := wdLineWidth150pt;
VTable.Borders.item(wdBorderRight).Color := wdColorRed;
//wdBorderTop:上边框
//wdBorderBottom:下边框
//wdBorderHorizontal:横线
//wdBorderVertical:竖线
end;