DestructiveInsert Method

Home Page (Objects)OverviewFAQReference

Applies to: TextSelection object

Inserts text in Overtype mode.

Syntax

object.DestructiveInsert text

Parameters

object

An expression that evaluates to a TextSelection object.

text

A String that specifies the text you want to insert.

Remarks

For each character in text, the DestructiveInsert method deletes a character to the right of the insertion point. However, the DestructiveInsert method ignores Tab characters and newline characters in text.

Example

For the current selection, the following example inserts the text "/*   */" in overtype mode:

ActiveDocument.Selection.DestructveInsert "/*  */"

See Also    Indent method, NewLine method, Overtype property, Type property, Unindent method.