I have a single-page “page layout” Pages document, and that page uses custom page template: a grid of small squares. Then I need to add multiple pages to this document using AppleScript. Those pages should be of the same page template as the first page:
But instead the added page is simply blank.
Here is the code which I currently use:
tell application "Pages"
tell front document
set newPage to make new page
end tell
end tell
I tried to make things like
tell application "Pages"
tell front document
set newPage to make new page with properties {page template: "my grid"}
end tell
end tell
but this doesn’t work.
Another approach I think about is to use duplicate
command to duplicate the current page instead of creating a new one by using make new page
. But I cannot figure out how to make it work.