| TextExtensionsInsert Method |
Inserts text at the specified position within the range.
Namespace: TextObjectModelAssembly: ManagedTOM2 (in ManagedTOM2.dll) Version: 1.0.5577.41188
Syntax public static void Insert(
this TextRange range,
int index,
string text,
[OptionalAttribute] RangeInsertMode mode
)
<ExtensionAttribute>
Public Shared Sub Insert (
range As TextRange,
index As Integer,
text As String,
<OptionalAttribute> mode As RangeInsertMode
)
public:
[ExtensionAttribute]
static void Insert(
TextRange^ range,
int index,
String^ text,
[OptionalAttribute] RangeInsertMode mode
)
Parameters
- range
- Type: TextObjectModelTextRange
The range to insert the text into. - index
- Type: SystemInt32
Character position (relative to the start of the range). - text
- Type: SystemString
The text to insert. - mode (Optional)
- Type: TextObjectModelRangeInsertMode
Controls how the start and end positions of the range are affected.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
TextRange. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
Exceptions Remarks See Also