Skip to main content

SetTemplateType

Sets one of the existing predefined numbering templates.

Syntax

expression.SetTemplateType(sType, sSymbol);

expression - A variable that represents a ApiNumberingLevel class.

Parameters

NameRequired/OptionalData typeDefaultDescription
sTypeRequired"none" | "bullet" | "1)" | "1." | "I." | "A." | "a)" | "a." | "i."The predefined numbering template.
sSymbolOptionalstring""The symbol used for the list numbering. This parameter has the meaning only if the predefined numbering template is "bullet".

Returns

boolean

Example

Set one of the existing predefined numbering templates in a document.

// How to set template type of the numbering in a document.

// Set "A." template to the numbering in a document.

let doc = Api.GetDocument();
let numbering = doc.CreateNumbering("numbered");
let numLvl = numbering.GetLevel(0);
numLvl.SetTemplateType("A.");
let paragraph = doc.GetElement(0);
paragraph.SetNumbering(numLvl);
paragraph.AddText("This is the first element of an A.-B.-C. numbered list");
paragraph = Api.CreateParagraph();
paragraph.SetNumbering(numLvl);
paragraph.AddText("This is the second element of an A.-B.-C. numbered list");
doc.Push(paragraph);
paragraph = Api.CreateParagraph();
paragraph.SetNumbering(numLvl);
paragraph.AddText("This is the third element of an A.-B.-C. numbered list");
doc.Push(paragraph);