Sets the text color to the current text run.
Name | Type | Description |
oApiFill | ApiFill | The color or pattern used to fill the text color. |
builder.CreateFile("docx"); var oDocument = Api.GetDocument(); var oParagraph = oDocument.GetElement(0); var oFill = Api.CreateSolidFill(Api.CreateRGBColor(255, 111, 61)); var oTextPr = oDocument.GetDefaultTextPr(); oTextPr.SetFill(oFill); oParagraph.AddText("This is a text run with the font color set to orange."); oParagraph.SetTextPr(oTextPr); builder.SaveFile("docx", "SetFill.docx"); builder.CloseFile();