Probably an easy question answered before, but here goes...
My toll-free phone number is on the left hand (even page) side of a master page. But I want an alternate phone number on every other page.
That is, if 1.800.LETTERS is on page 2, I want 1.800.1234567 to be on page 4, and so on. Must I make another master page and list EVERY page number (2,4,6,8,10,...) it will appear on?
Heres the script...
You can undo it with Ctr Z so no need to be scared ![]()
#target indesign
// Script by Trevor to make every other left page a different master
app.doScript("main()", ScriptLanguage.javascript, undefined, UndoModes.FAST_ENTIRE_SCRIPT, "Apply Masters");
function main(){
// Change startPage to page you need if you don't want to start from the begining of the doc
startPage = 4;
// Change endPage to page you need if you don't want to end at the end of the doc
endPage = app.activeDocument.pages.length;
// Change pageSide to 1 for every other right hand side
pageSide = 0;
//* ASSUMES YOUR MASTER IS CALLED "B-Master" Change to real name
myMaster = "B-Master";
for (c=startPage; c<endPage; c++){
(c%4 == pageSide) ? app.activeDocument.pages.item(c).appliedMaster
= app.activeDocument.masterSpreads.item(myMaster) : 0;
}
}
North America
Europe, Middle East and Africa
Asia Pacific