When I was working with Quark XPress, I used to have an extension allowing for pasting on multiple pages. I looked in the Help and did a quick search online but couldn't find a solution for that in InDesign.
Ideally, I'd like to be able to select a few objects, that might not be on the same layer, select a range of pages, and be able to paste these objects on those pages all at once.
Do you know if this is possible? If not, is there a script for that?
Post edited 8:43 am – February 2, 2012 by Jongware Post edited 8:47 am – February 2, 2012 by Jongware
The copying-and-pasting bits are scriptable, but unfortunately the scripting interface doesn't allow access to your 'selected range of pages' in the Pages panel. (If this happens to get added in CS6, it'd be a welcome addition … I could think of a few useful things to do with it!)
Oh sure you can use Master pages (in fact, do you have reasons not to?), but I've had some fun writing this quick Javascript. It uses logical page numbers, unencumbered by stuff like roman numeral preambles and separe sections, so take care to enter the right ones.
//DESCRIPTION: Multi Copy to Multi Pages
// A Jongware script, 2-Feb-2012
// Make sure there is something appropriate selected
if (app.documents.length > 0 && app.selection.length > 0 && !(app.selection[0].hasOwnProperty("baseline")))
{
if (parseFloat(app.version) < 6)
multiCopy (app.selection);
else
app.doScript(multiCopy, ScriptLanguage.JAVASCRIPT, app.selection, UndoModes.ENTIRE_SCRIPT, "Multi Copy to Multi Pages");
} else
{
alert ("No valid selection.\nPlease select one single object with the black arrow before running this script.");
}
function multiCopy (sel)
{
originalPage = app.layoutWindows[0].activePage.documentOffset;
pagerange = prompt ("Apply to page range (logical page numbers):", String(originalPage+1)+"-"+String(app.activeDocument.pages.length));
if (pagerange != null)
{
pagerange_nrs = pagerange.match(/^(\d+)-(\d+)$/);
if (pagerange_nrs.length == 3)
{
// ID pages start counting at 0, so subtract 1:
startpg = Number(pagerange_nrs[1])-1;
if (startpg < 0)
{
alert ("Surely you are joking? You can't start at page 0!");
return;
}
endpg = Number(pagerange_nrs[2]);
if (endpg >= app.activeDocument.pages.length)
{
alert ("Surely you are joking? You can't continue after the last page!");
return;
}
// Subtracting 1 not necessary for the end page
// (that's due to JavaScript for..loop behavior)
for (i=startpg; i<endpg; i++)
{
if (i != originalPage)
{
for (j=0; j<sel.length; j++)
sel[j].duplicate (app.activeDocument.pages[i]);
}
}
} else
alert ('Bad page range. Please use "from-to" syntax using logical page numbering.');
}
}
(Edit: next time watch out for possible post enhancements..)