Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

How to tell Pages to insert pagebreak before every table

How to tell Pages to insert a pagebreak before every tables EXCEPT the one starting with the word YELLOW


Thank you so much!!

AppleScript

Posted on Aug 21, 2013 5:42 AM

Reply
2 replies

Aug 21, 2013 2:09 PM in response to thebluedrg

Try this:


tell application "Pages"

activate

tell body text of front document

repeat with k from 1 to (count tables)

selecttablek

tell application "System Events" to keystroke "c" using {command down}

if (the clipboard) does not start with "Yellow" then

selectinsertion point before tablek

insert page break

end if

end repeat

end tell

end tell

How to tell Pages to insert pagebreak before every table

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.