Command: move start of range
Moves the start position of the specified text range. Use this command to return a new text range
move start of range text range Required. An expression that returns a text range object.
[by enumeration] Optional. The unit by which the collapsed text range is to be moved. Can be
one of the following: a character item, a word item, a sentence item, a paragraph item, a line
item, a story item, a screen, a section, a column, a row, a window, a cell, a character
formatting, a paragraph formatting, a item unit, or a table. The default value is a character
[count integer] Optional. The maximum number of units by which the specified text range is to
be moved. If count is a positive number, the start position of the text range is moved forward
in the document. If its a negative number, the start position is moved backward. If the start
position is moved forward to a position beyond the end position, the text range is collapsed
and both the start and end positions are moved together. The default value is 1.
This example moves the start position of the text range one character forward (the text range size is
reduced by one character). Note that a space is considered a character.
set myRange to move start of range text object of selection by a character ¬
This example sets
to be equal to the second word in the active document. The example uses
the move start of range command to move the start position of
(a text range object)
backward one word. After this script is run, the first and second words in the document are
if (count of words in active document) 2 then
set myRange to word 2 of active document
set myRange to move start of range myRange by a word item count -1
Returns a text range object that refers to the start position of the next item or the location specified
by the to argument.
Note When you use this command with the goto grammatical error, goto proofreading error, or
goto spelling error constant, the text range object thats returned includes any grammar error text or
spelling error text.