Share via


TextRange.Move Method

SharePoint Designer Developer Reference

Collapses a TextRange object to the start of the range, and then moves the insertion point from the starting point in the range by the specified number of units. Returns a Long that represents the number of units moved.

Syntax

expression.Move(Unit, Count)

expression   Required. A variable that represents a TextRange object.

Parameters

Name Required/Optional Data Type Description
Unit Required String Specifies the type of unit. Can be one of the following values:
Value Description
character Moves one or more characters.
word Moves one or more words. A word is a collection of characters terminated by a space or some other white-space character, such as a tab. Punctuation is also included in the word count, so a period at the end of a sentence or a comma in the middle of a sentence increases the word count by one.
sentence Moves one or more sentences. A sentence is a collection of words terminated by a punctuation character, such as a period.
textedit Moves to the start or end of the original range.
Count Optional Long Specifies the number of units to move. This number can be positive (moves the insertion point to the right of the starting point in the range) or negative (moves the insertion point to the left of the starting point in the range). The default is 1.

Return Value
Long

See Also