[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.ITextRun.InsertBefore

InsertBefore Method

InsertBefore(string)

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.

Declaration
ITextRun InsertBefore(string text)
Function InsertBefore(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.

Examples
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;