I would like to know the AppleScript syntax to reach a certain pagraph before the last in a Pages document.
For example, if I wish to reach the paragraph before the last I can use:
tell application "Pages"
activate
tell the front document
tell body text
tell the first word of the paragraph before the last paragraph
set the color of it to "blue"
set the size to "18"
set the font to "Times New Roman Bold"
end tell
end tell
end tell
end tell
However, if I wished to do so for the second paragraph before the last paragraph or the second paragraph after the first paragraph I get a syntax error. (For example:
tell the first word of the second paragraph before the last paragraph
or
tell the first word of paragraph two before the last paragraph
Could someone let me know what the correct syntax is?