TextRange.expand() (Method)

Expands a TextRange by a character, word, sentence or story.


JScript - 3.0
Internet Explorer - 4.0
JavaScript syntax:IEmyTextRange.expand(aSelector)
Argument list:aSelectorIndicates what to expand the TextRange by

This method has a single argument. The argument indicates what to look for when expanding the TextRange object. The end point is modified according to the rules determined by this keyword. The following keywords can be applied:

The character keyword causes the endpoint to be indexed onwards by a single character position.

The word keyword looks for the next word break in the document text. It also moves the start point to he beginning of the word.

The sentence keyword looks for the next full stop at the end of a sentence. It also looks onwards from this to move the start point to the beginning of the sentence.

The textedit keyword restores the TextRange so it encapsulates only the original selection.

This method returns a Boolean true if the range expansion succeeded and a Boolean false if it didn't.

See also:TextRange.move()