This project has moved and is read-only. For the latest updates, please go here.

Set Table Cell Background Color

Apr 30, 2014 at 5:10 PM
How do I set the background color? For example, suppose we want the cell to be black with white text. Can I do that for a single cell?
May 5, 2014 at 1:41 AM
I had been trying to develop an app using DocX without any documentation. I found the help file today in the downloads. This is easily done:
    t.rows(0).Cells(0).FillColor = Color.Black
    t.rows(0).Cells(0).Paragraphs(0).Append(PrintLine).Color(Color.White)
Here, PrintLine is a string containing the text to be added to the paragraph.
Marked as answer by rkulp on 5/4/2014 at 5:41 PM
May 5, 2014 at 3:35 AM
Glad you solved it for yourself :-)