Skip to main content

SetStart

Specifies the starting value for the numbering used by the parent numbering level within a given numbering level definition. By default this value is 1.

Syntax

expression.SetStart(nStart);

expression - A variable that represents a ApiNumberingLevel class.

Parameters

NameRequired/OptionalData typeDefaultDescription
nStartRequirednumberThe starting value for the numbering used by the parent numbering level.

Returns

boolean

Example

This example specifies the starting value for the numbering used by the parent numbering level within a given numbering level definition.

// How to set the bullet numbering to the paragraph.

// Reset the numbering of the bulleted text.

let doc = Api.GetDocument();
let numbering = doc.CreateNumbering("numbered");
let numLvl = numbering.GetLevel(0);
let numLvl1 = numbering.GetLevel(1);
numLvl1.SetStart(5);
let paragraph = doc.GetElement(0);
paragraph.SetNumbering(numLvl);
paragraph.AddText("This is the first element of a parent numbered list which starts with '1'");
paragraph = Api.CreateParagraph();
paragraph.SetNumbering(numLvl1);
paragraph.AddText("This is the first element of a child numbered list which starts with 'e'");
doc.Push(paragraph);