The paragraph style base method.
Name | Type | Description |
oStyle | ApiStyle | The style of the paragraph to be set. |
builder.CreateFile("docx"); var oDocument = Api.GetDocument(); var oHeading6Style = oDocument.GetStyle("Heading 6"); var oParaPr = oHeading6Style.GetParaPr(); oParaPr.SetJc("center"); var oParagraph = oDocument.GetElement(0); oParagraph.SetStyle(oHeading6Style); oParagraph.AddText("This is a text in a paragraph styled with the 'Heading 6' style."); builder.SaveFile("docx", "SetStyle.docx"); builder.CloseFile();