SetRange Method

See Also         Example         Applies To

Sets the starting and ending character positions for the range or selection.

Note   Character position values start at the beginning of the story, with the first value being 0 (zero). All characters are counted, including nonprinting characters. Hidden characters are counted even if they're not displayed.

Syntax

expression.SetRange(Start, End)

expression   Required. An expression that returns a Range or Selection object.

Start   Required Long. The starting character position of the range or selection.

End   Required Long. The ending character position of the range or selection.

Remarks

The SetRange method redefines the starting and ending positions of an existing Selection or Range object. This method differs from the Range method, which is used to create a range, given a starting and ending position.