Class: grammatical error
A list of grammatical errors for the specified document or range. Each item in the grammatical error
list is a text range object that represents one grammatical error.
Use grammatical errors to return the list of all grammatical errors in a document or text range. The
following example counts the spelling and grammatical errors in the active document and displays
the results in a message box.
set pr1 to spelling errors of active document
set sc to count of pr1
set pr2 to grammatical errors of active document
set gc to count of pr2
display dialog "Spelling errors: " & sc & "\r" & "Grammatical errors: " & gc
To return a single grammatical error (represented by a text range object, use grammatical error
index, where index is the index number. The following example displays the sentence that contains
the first grammatical error in the active document.
set myRange to content of grammatical error 2 of active document
display dialog myRange
<Inheritance> text range
Inherits the properties and elements of the text range class.
Represents a single paragraph in a selection, range, or document. The paragraphs list includes all
the paragraphs in a selection, range, or document.
To return a single paragraph object, use paragraph index, where index is the index number. The
following example right aligns the first paragraph in the active document.
set alignment of paragraph 1 of active document to align paragraph right
To add a new, blank paragraph to a document, use the
command. When you use
the insert paragraph command, the specified range is replaced by the new paragraph.
insert paragraph at text object of paragraph 1 of active document