[]
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.
ITextRange Add(string newText = "", int position = -1)
Function Add(Optional newText As String = "", Optional position As Integer = -1) As ITextRange
| Type | Name | Description |
|---|---|---|
| string | newText | The new text. |
| int | position | The position that you want to insert. |
| Type | Description |
|---|---|
| ITextRange | The new ITextRange. |
ITextRange body = shape.TextFrame.TextRange;
body.Paragraphs.Add("First paragraph");
ITextRange insertedParagraph = body.Paragraphs.Add("Title", 0);