Get Started
Usage API
More information

CreateParagraph

CreateParagraph() → { ApiParagraph }

Create a new paragraph.

Parameters:

This method doesn't have any parameters.

Returns:

Type
ApiParagraph

Example

Copy code
builder.CreateFile("docx");
oDocument = Api.GetDocument();
oParagraph = Api.CreateParagraph();
oParagraph.AddText("This is a new paragraph");
oDocument.Push(oParagraph);
builder.SaveFile("docx", "CreateParagraph.docx");
builder.CloseFile();

Resulting document