[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.Drawing.ITextRange.Add

Add Method

Add(string, int)

Adds text to the specified collection.

This method is only used when Type is Body or Paragraph. Calling it on a body text range adds a paragraph with a run. Calling it on a paragraph text range adds a run.

Declaration
ITextRange Add(string newText = "", int position = -1)
Function Add(Optional newText As String = "", Optional position As Integer = -1) As ITextRange
Parameters
Type Name Description
string newText

The new text.

int position

The position that you want to insert.

Returns
Type Description
ITextRange

The new ITextRange.

Examples
ITextRange body = shape.TextFrame.TextRange;
body.Paragraphs.Add("First paragraph");
ITextRange insertedParagraph = body.Paragraphs.Add("Title", 0);