Reply To: Script to duplicate page/spread after current

#70280
Matt Mayerchak
Participant

Thanks for the freebie!

When I make invoices, I often find what I want is to copy a previous invoice and make a new page in front of the current first page of the document. So, I just tried changing the word “AFTER” in Jongware’s script to BEFORE as follows:

app.layoutWindows[0].activePage.duplicate (LocationOptions.BEFORE, app.layoutWindows[0].activePage);

That works – but now, it puts the page in front of the current one. So, If I’m on page 1, it dupes page one in front of itself. That’s cool, but not much better than duping right after itself.

If I am on page 20, and want to dupe that page to the start of the document (a new page 1), what word would I use instead of BEFORE?

This article was last modified on August 27, 2014

Comments (0)

Loading comments...