Microsoft Word Suite
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"
display dialog "Not all paragraphs share the same left and right indents"
Command: select current spacing
Extends the selection forward until a paragraph with different line spacing is encountered.
select current spacing selection object Required. An expression that returns a selection object.
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.
select current tabs selection object Required. An expression that returns a selection object.
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 current tabs selection