[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.ITextRun.InsertAfter

InsertAfter Method

InsertAfter(string)

Inserts a new ITextRun after the current text run.

Use this method to add a new text run immediately after the current run within the parent IRichText object.

Declaration
ITextRun InsertAfter(string text)
Function InsertAfter(text As String) As ITextRun
Parameters
Type Name Description
string text

The text of the newly inserted text run.

Returns
Type Description
ITextRun

The newly created ITextRun, or null if the current text run is no longer available in the parent rich text object.

Examples
IRichText richText = worksheet.Range["A1"].RichText;
richText.Add("Hello");
ITextRun textRun = worksheet.Range["A1"].Characters(1, 3);
ITextRun insertedRun = textRun.InsertAfter("World");
insertedRun.Font.Bold = true;