Hello,
I try to insert table into word and the following code works fine:
wrdSelection := wrdApp.Selection;
wrdRange := wrdSelection.Range;
wrdTable := wrdSelection.Tables.Add(wrdRange, Cells, Columns);
wrdTable.AutoFormat(AutoFormat);
// But I would like to remove table borders and following code is not working:
wrdTable.Borders.InsideLineStyle := 0;
wrdTable.Borders.OutsideLineStyle := 0;
Is there any other option to remove table borders in word table?
Any help is welcome.
Try this code
wrdTables := wrdDoc.Tables;
wrdTable := wrdTables.Item(1);
wrdTable.Select;
wrdApp.Selection.Borders(wdBorderTop).LineStyle := 0;
wrdApp.Selection.Borders(wdBorderLeft).LineStyle := 0;
wrdApp.Selection.Borders(wdBorderBottom).LineStyle := 0;
wrdApp.Selection.Borders(wdBorderRight).LineStyle := 0;
wrdApp.Selection.Borders(wdBorderHorizontal).LineStyle := 0;
wrdApp.Selection.Borders(wdBorderVertical).LineStyle := 0;
wrdApp.Selection.Borders(wdBorderDiagonalDown).LineStyle := 0;
wrdApp.Selection.Borders(wdBorderDiagonalUp).LineStyle := 0;
ttss82
3
Thx for your answer Lambert.
But how can I define variables wdBorderTop, wdBorderLeft …?