Get Started
Usage API

CreateNumbering

CreateNumbering(sType, nStartAt) → { ApiBullet }

Create a bullet for a paragraph with the character or symbol specified with the sType parameter.

Parameters:

Name Type Description
sType BulletType

The numbering type the paragraphs will be numbered with.

nStartAt number

The number the first numbered paragraph will start with.

Returns:

Type
ApiBullet

Example

Copy code
builder.CreateFile("docx");
oDocument = Api.GetDocument();
oNumbering = oDocument.CreateNumbering("bullet");
for (nLvl = 0; nLvl < 2; ++nLvl) {
  oNumLvl = oNumbering.GetLevel(nLvl);
  oParagraph = Api.CreateParagraph();
  oParagraph.AddText("This is an example of the bulleted paragraph № " + (nLvl + 1));
  oParagraph.SetNumbering(oNumLvl);
  oDocument.Push(oParagraph);
}
builder.SaveFile("docx", "CreateNumbering.docx");
builder.CloseFile();

Resulting document