Expand Minimize
0 out of 1 rated this helpful - Rate this topic

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)

'Usage
Dim Unit As Object
Dim Count As Object
Dim returnValue As Integer
Dim selection1 As Selection
returnValue = selection1.Delete(Unit, Count)
int Delete(
	[In, Optional] ref object Unit, 
	[In, Optional] ref object Count
);
public int Delete(
	/*in*/System.Object Unit, 
	/*in*/System.Object Count
);
function Delete(
	 Unit : Object, 
	 Count : Object
) : int;

Parameters

Unit

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

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.

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


Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, and Windows 2000

Target Platforms

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.