Selection.Delete (Word)

Deletes the specified number of characters or words.

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

Delete (Unit, Count)


Sub DeleteSelection() 
 Dim intResponse As Integer 
 
 intResponse = MsgBox("Are you sure you want to " & _ 
 "delete the contents of the document?", vbYesNo) 
 
 If intResponse = vbYes Then 
 ActiveDocument.Content.Select 
 Selection.Delete 
 End If 
End Sub

Arguments

Optional arguments

The following arguments are optional

Unit (WdUnits) - The unit by which the collapsed selection is to be deleted. Can be one of the WdUnits constants.

Here you can find possible values for WdUnits

Count (Long) - 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.