Syntax
EditClear [Count]
Remarks
Deletes the selection or a specified number of characters. Unlike EditCut, EditClear does not change the contents of the Clipboard.
Argument | Explanation | |
Count | Specifies the number and location of characters to delete: > 0 (zero) Deletes characters to the right of the insertion point. Omitted Deletes the selection or the character to the right of the insertion point. < 0 (zero) Deletes characters to the left of the insertion point. If Count is nonzero and there is a selection, Word deletes the selection and counts it as one character against Count. Note that EditClear 0 has no effect. |
Note
In Word version 6.0, if EditClear deletes a paragraph mark, the combined paragraphs are formatted with the style of the remaining paragraph mark. In Word version 7.0, the combined paragraphs are formatted with the style of the deleted paragraph mark. For compatibility, in Word version 6.0 macros converted to Word version 7.0, the EditClear statement is changed to WW6_EditClear, which maintains the Word version 6.0 behavior.
Example
This example deletes five characters to the right of the insertion point or, if there is a selection, deletes the selection plus four characters:
EditClear 5
See Also
EditCut