[]
Inserts a new ITextRun before the current text run.
Use this method to add a new text run immediately before the current run within the parent IRichText object.
ITextRun InsertBefore(string text)
Function InsertBefore(text As String) As ITextRun
| Type | Name | Description |
|---|---|---|
| string | text | The text of the newly inserted text run. |
| Type | Description |
|---|---|
| ITextRun | The newly created ITextRun. |
IRichText richText = worksheet.Range["A1"].RichText;
richText.Add("Hello");
ITextRun textRun = worksheet.Range["A1"].Characters(1, 3);
ITextRun insertedRun = textRun.InsertBefore("World");
insertedRun.Font.Bold = true;