This example displays the Thesaurus with synonyms for the selected text.
check synonyms text object of selection
This example displays the Thesaurus dialog box with synonyms for the first word in the active
check synonyms word 1 of active document
Command: close up
Removes any spacing before the specified paragraphs.
close up paragraph/paragraph format Required. An expression that returns a paragraph or
paragraph format object.
The following two statements are equivalent:
close up paragraph 1 of active document
set space before of paragraph 1 of active document to 0
This example removes any space before the first paragraph in the selection.
close up paragraph 1 of selection
This example changes the Heading 1 style in the active document so that there's no space before
Heading 1 paragraphs.
close up paragraph format of Word style "Heading 1" of active document
Command: collapse range
Collapses a text range to the starting or ending position and returns a new text range object. After a
range or selection is collapsed, the starting and ending points are equal.
collapse range text range Required. An expression that returns a text range.
[direction enumeration] Optional. The direction in which to collapse the range or selection. Can
be either of the following: collapse end or collapse start. The default value is collapse start.
If you use collapse end to collapse a range that refers to an entire paragraph, the range is located
after the ending paragraph mark (the beginning of the next paragraph). However, you can move the
range back one character by using the
move end of range
command after the range is collapsed, as
shown in the following example.
set myRange to text object of paragraph 1 of active document
set myRange to collapse range myRange direction collapse end
set myRange to move end of range myRange by a character item count -1