Get Started
Documentation

ApiNumbering

new ApiNumbering()

Class representing a numbering properties.

Methods

Name Description
GetClassType

Get the type of this class.

GetLevel

Get the specified level of the current numbering.

Example

Copy code
builder.CreateFile("docx");
var oDocument = Api.GetDocument();
var oParagraph;
var oNumbering = oDocument.CreateNumbering("bullet");
var oNumLvl;
for (var nLvl = 0; nLvl < 8; ++nLvl) {
  oNumLvl = oNumbering.GetLevel(nLvl);
  oParagraph = Api.CreateParagraph();
  oParagraph.AddText("Default bullet lvl " + (nLvl + 1));
  oParagraph.SetNumbering(oNumLvl);
  oParagraph.SetContextualSpacing(true);
  oDocument.Push(oParagraph);
}
builder.SaveFile("docx", "ApiNumbering.docx");
builder.CloseFile();

Resulting document