Sets one of the existing predefined numbering templates.
Name | Type | Default | Description |
sType | "none" | "bullet" | "1)" | "1." | "I." | "A." | "a)" | "a." | "i." | The predefined numbering template. |
|
sSymbol | string | "" | The symbol used for the list numbering. This parameter has the meaning only if the predefined numbering template is "bullet". |
builder.CreateFile("docx"); var oDocument = Api.GetDocument(); var oNumbering = oDocument.CreateNumbering("numbered"); var oNumLvl = oNumbering.GetLevel(0); oNumLvl.SetTemplateType("A."); var oParagraph = oDocument.GetElement(0); oParagraph.SetNumbering(oNumLvl); oParagraph.AddText("This is the first element of an A.-B.-C. numbered list"); oParagraph = Api.CreateParagraph(); oParagraph.SetNumbering(oNumLvl); oParagraph.AddText("This is the second element of an A.-B.-C. numbered list"); oDocument.Push(oParagraph); oParagraph = Api.CreateParagraph(); oParagraph.SetNumbering(oNumLvl); oParagraph.AddText("This is the third element of an A.-B.-C. numbered list"); oDocument.Push(oParagraph); builder.SaveFile("docx", "SetTemplateType.docx"); builder.CloseFile();