Export (0) Print
Expand All
Expand Minimize

Selection.Delete Method

Deletes the specified number of characters or words.

Namespace:  Microsoft.Office.Interop.Word
Assembly:  Microsoft.Office.Interop.Word (in Microsoft.Office.Interop.Word.dll)

int Delete(
	ref Object Unit,
	ref Object Count
)

Parameters

Unit
Type: System.Object%
Optional Object. The unit by which the collapsed range or selection is to be deleted. Can be one of the following WdUnits constants: wdCharacter (default) or wdWord.
Count
Type: System.Object%
Optional Object. The number of units to be deleted. To delete units after the selection, collapse the selection and use a positive number. To delete units before the selection, collapse the selection and use a negative number.

Return Value

Type: System.Int32

This method returns an Integer value that indicates the number of items deleted, or it returns 0 (zero) if the deletion was unsuccessful.

Community Additions

ADD
Show:
© 2015 Microsoft