Thursday 15 May 2014

C# code to fill color in a table cell in a word document -


I have created a word document in which C # is used, I now have a cell in this table with red I want to fill. While searching on the net, I came to know that I can use the shading object to do this. But I could not find any information about how I can use it.

I tried to do something like this:

  doc.Tables [thatTable] .ell (1,4) range. Background Pattern Color   

But how can I set a color using this ???

If you look into this, you will see the dublodollar constant; There is an enumeration list to see more information about.

In order to select the table cell, your code looks correct, so you only have one background color for WdColors.

No comments:

Post a Comment