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 oRun = Api.CreateRun(); oRun.AddText("This is a text run with the font color set to orange."); var oFill = Api.CreateSolidFill(Api.CreateRGBColor(255, 111, 61)); oRun.SetFill(oFill); oParagraph.AddElement(oRun); builder.SaveFile("docx", "SetFill.docx"); builder.CloseFile();