Specifies the shading applied to the contents of the current text run.
Name | Type | Description |
sType | ShdType | The shading type applied to the contents of the current text run. |
r | byte | Red color component value. |
g | byte | Green color component value. |
b | byte | Blue color component value. |
builder.CreateFile("docx"); var oDocument = Api.GetDocument(); var oParagraph = oDocument.GetElement(0); var oRun = Api.CreateRun(); oRun.AddText("This is just a sample text. "); oParagraph.AddElement(oRun); oRun = Api.CreateRun(); oRun.SetShd("clear", 255, 111, 61); oRun.AddText("This is a text run with the text shading set to orange."); oParagraph.AddElement(oRun); builder.SaveFile("docx", "SetShd.docx"); builder.CloseFile();