SetTemplateType
Set one of the existing predefined numbering templates.
Parameters:
Name |
Type |
Default |
Description |
sType |
"none" | "bullet" | "1)" | "1." | "I." | "A." | "a)" | "a." | "i."
|
|
Set one of the existing predefined numbering templates. |
sSymbol |
string
|
"" |
The symbol used for the list numbering. This parameter have a meaning only if the sType="bullet" property is selected. |
Example
Copy code
builder.CreateFile("docx");
oDocument = Api.GetDocument();
oNumbering = oDocument.CreateNumbering("numbered");
oNumLvl = oNumbering.GetLevel(0);
oNumLvl.SetTemplateType("A.");
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();
Resulting document