Delete Method

Home Page (Objects)OverviewFAQReference

Applies to: TextSelection object

Performs the function of the DELETE key.

Syntax

object.Delete [count]

Parameters

object

An expression that evaluates to a TextSelection object.

count

(Optional) A Long that specifies the number of times you want to repeat this action. The default is one.

Remarks

If no selection exists, the Delete method deletes the first character to the right of the insertion point.

Example

For the current selection, the following example deletes the selection:

ActiveDocument.Selection.Delete

See Also   Cut method, DeleteWhitespace method.