Sets the background color to all cells in the current table.
Name | Type | Description |
r | byte | Red color component value. |
g | byte | Green color component value. |
b | byte | Blue color component value. |
bNone | boolean | Defines that background color will not be set. |
builder.CreateFile("docx"); var oDocument = Api.GetDocument(); var oTableStyle = oDocument.CreateStyle("CustomTableStyle", "table"); oTableStyle.SetBasedOn(oDocument.GetStyle("Bordered")); var oTable = Api.CreateTable(4, 2); oTable.SetWidth("percent", 100); oTable.SetStyle(oTableStyle); oTable.SetBackgroundColor(255, 111, 61, false); oDocument.Push(oTable); builder.SaveFile("docx", "SetBackgroundColor.docx"); builder.CloseFile();