TRY NEW VERSION

Try now New API BETA

Try out the new view and capabilities of the API documentation

START

CreateRun

CreateRun() → { ApiRun }

Creates a new smaller text block to be inserted to the current paragraph or table.

Parameters:

This method doesn't have any parameters.

Returns:

Type
ApiRun

Example

Copy code
builder.CreateFile("docx");
var oDocument = Api.GetDocument();
var oParagraph = oDocument.GetElement(0);
var oRun = Api.CreateRun();
oRun.AddText("This is a text run");
oParagraph.AddElement(oRun);
builder.SaveFile("docx", "CreateRun.docx");
builder.CloseFile();

Resulting document