Skip to main content

Select

Selects the current run.

Syntax

expression.Select();

expression - A variable that represents a ApiRun class.

Parameters

This method doesn't have any parameters.

Returns

boolean

Example

This example selects the current run.

let doc = Api.GetDocument();
let paragraph = doc.GetElement(0);
let run = Api.CreateRun();
run.AddText("This is just a sample text.");
paragraph.AddElement(run);
run.Select();
paragraph.AddLineBreak();
paragraph.AddText("The text from the first run was selected.");