Yigal BZ

Yigal BZ

  • 1.6k
  • 112
  • 7.3k

How to control borders of specific cells in ms-word table?

Apr 8 2019 3:31 AM

The C# code creates a table in a word file.

How can the border between two cells, assuming a condition is met, e.g. x==5?

So in most cases the border will remain, but sometimes removed?

The code that creates the lines of the table (one line at a time):

  1. table.Rows[line_cnt].Cells[c_cnt].Paragraphs.First().Append(p.Name); 

In case the condition is met, the border of this cell with the cell above it (or below it) needs not to be displayed.


Answers (2)