Text Suite
444
previous paragraph....................................................................................................................................................476
previous range ............................................................................................................................................................477
previous subdocument ..............................................................................................................................................477
relocate.........................................................................................................................................................................478
reset ..............................................................................................................................................................................478
set range.......................................................................................................................................................................479
sort ascending .............................................................................................................................................................479
sort................................................................................................................................................................................480
sort descending...........................................................................................................................................................482
space 1..........................................................................................................................................................................482
space 15........................................................................................................................................................................482
space 2..........................................................................................................................................................................483
tab hanging indent .....................................................................................................................................................483
tab indent.....................................................................................................................................................................483
text range spelling suggestions.................................................................................................................................484
Command: auto format text range
Automatically formats a text range. The arguments for this command correspond to the options in
the Table AutoFormat dialog box (Table menu).
Syntax
auto format text range text range Required. An expression that returns a text range object.
Example
This example automatically formats the selection.
auto format text range text object of selection
Command: calculate range
Calculates a mathematical expression within a range or selection. Returns the result as a small real
number.
Syntax
calculate range text range Required. An expression that returns a text range.
Example
This example inserts a mathematical expression at the beginning of the active document, calculates
the expression, and then appends the results to the range. The result is "1 + 1 = 2".
type text selection text "1 + 1"
set myRange to set range text object of active document start (start of ¬
content of text object of active document) end (end of content ¬
of text object of active document)
type text selection text "= " & (calculate range myRange)
This example calculates the selected mathematical expression and displays the result.
display dialog "The answer is... " & calculate range text object of selection