How to: Programmatically Reset Ranges in Word Documents
Visual Studio 2012
Use the SetRange method to resize an existing range in a Microsoft Office Word document.
Applies to: The information in this topic applies to document-level projects and application-level projects for Word 2013 and Word 2010. For more information, see Features Available by Office Application and Project Type.
To reset an existing range
-
Set an initial range starting with the first seven characters in the document.
The following code example can be used in a document-level customization.
The following code example can be used in an application-level add-in. This code uses the active document.
-
Use SetRange to start the range at the second sentence and end it at the end of the fifth sentence.