Microsoft Word Suite
329
This example determines whether all the paragraphs in the active document are formatted with the
same left and right indents and then displays a message box indicating the result.
home key move unit a story extend by moving
select current indent selection
collapse range text object of selection direction collapse end
if (end of content of text object of selection) = ((end of content of ¬
text object of active document) - 1) then
display dialog "All paragraphs share the same left and right indents"
else
display dialog "Not all paragraphs share the same left and right indents"
end if
Command: select current spacing
Extends the selection forward until a paragraph with different line spacing is encountered.
Syntax
select current spacing selection object Required. An expression that returns a selection object.
Example
This example selects all consecutive paragraphs that have the same line spacing and changes the
line spacing to single spacing.
select current spacing selection
space 1 paragraph format of selection
Command: select current tabs
Extends the selection forward until a paragraph with different tab stops is encountered.
Syntax
select current tabs selection object Required. An expression that returns a selection object.
Example
This example selects the second paragraph in the active document and then extends the selection to
include all other paragraphs that have the same tab stops.
set myRange to text object of paragraph 2 of active document
select myRange
select current tabs selection