Get Started
Usage API
More information

Select

Select() → { bool }

Select a run.

Parameters:

This method doesn't have any parameters.

Returns:

Type
bool

Example

Copy code
builder.CreateFile("docx");
oDocument = Api.GetDocument();
oParagraph = oDocument.GetElement(0);
oRun = Api.CreateRun();
oRun.AddText("This is just a sample text.");
oParagraph.AddElement(oRun);
oRun.Select();
oParagraph.AddLineBreak();
oParagraph.AddText("The text from the first run was selected.");
builder.SaveFile("docx", "Select.docx");
builder.CloseFile();

Resulting document