GetNext

GetNext() → { ApiParagraph | null }

Returns the next paragraph.

Parameters:

This method doesn't have any parameters.

Returns:

Type
ApiParagraph | null

Example

Copy code
builder.CreateFile("docx");
var oDocument = Api.GetDocument();
var oParagraph1 = oDocument.GetElement(0);
oParagraph1.AddText("This is just a sample paragraph №1.");
var oParagraph2 = Api.CreateParagraph();
oParagraph2.AddText("This is just a sample paragraph №2.");
oDocument.Push(oParagraph2);
var oNextParagraph = oParagraph1.GetNext();
oNextParagraph.SetBold(true);
builder.SaveFile("docx", "GetNext.docx");
builder.CloseFile();

Resulting document