Copy link to clipboard
Copied
Hello! I'm trying to copy and paste either selected objects/groups or a layer into 5 subsequent pages right from page 1. It's going to be repeated over 600 times if I have to do it manually...... Is there any way/scripts for this? Please help! Thank you so much.
Are all the text frames you want to copy on the same, unique layer? You mentioned layers earlier.
Do you need to create the 5 subsequent pages, or do they already exist?
No existing script exists that solves your unique case, but something custom could probably be developed.
Rudimentarily speaking, you could do something like this if the target pages already exist. Note that the offset of the duplicated frames would be off if you are working with facing pages and have a wider outer margin than
...Copy link to clipboard
Copied
Don't use Copy and Paste, use Place and then use the Microsoft Word Import facility, where you can map Word paragraph and character styles to your InDesign styles. This YouTube tutorial shows you how (how map styles starts about 11 minutes in):
https://m.youtube.com/watch?v=0guCSyq-Avs
I suggest you experiment first with a couple of test documents to get the hang of it. There's a lot on this kind of workflow, if you have to do it regularly there's a whole tutorial on it by AM on Linkedin Learning (you can get 30-days free access): https://www.linkedin.com/learning/word-and-indesign-integration?trk=learning-serp_learning_search-ca...
Copy link to clipboard
Copied
Thank you for your reply, Derek! I'm actually having to copy hyperlinked text frames within the spread and paste in place into the next few pages. So importing MS Word wouldn't apply here......
Copy link to clipboard
Copied
Copy link to clipboard
Copied
It's about 800-900 pages which are hyperlinked within the document. So the destination is just the pages within the document. The threaded text frames have hyperlinked text within them, and I'm trying to copy a group of text frames from page, say, 1 to the subsequent 5 pages. And then copy the frames from page 6 and paste in place into the next 5 pages, and rinse and repeat. Would this be possible without changing the applied master pages? Thank you so much!
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Are all the text frames you want to copy on the same, unique layer? You mentioned layers earlier.
Do you need to create the 5 subsequent pages, or do they already exist?
No existing script exists that solves your unique case, but something custom could probably be developed.
Rudimentarily speaking, you could do something like this if the target pages already exist. Note that the offset of the duplicated frames would be off if you are working with facing pages and have a wider outer margin than inner margin. Also, the try block would fail if the selected item is not duplicable (ie a highlighted text selection)
var select = app.selection;
var doc = app.activeDocument;
for (var i = 0; i < select.length; i++) {
try {
var currPageIdx = select[i].parentPage.documentOffset;
var bounds = select[i].geometricBounds;
for (var j = 1; j <= 5; j++) {
currPage = doc.pages[currPageIdx + j];
select[i].duplicate(currPage);
}
}
catch(e) {}
}
If all the desired page items to copy are on their own layer, you could sub the select variable for this:
var select = app.activeDoucment.layers.itemByName("The Layer In Question").allPageItems;
Copy link to clipboard
Copied
@federico_platon, I’m sorry about the confusion. I’m in a project of making an ebook with extensive hyperlinks throughout the document, so there has been a lot of manual work already. A number of master pages are applied to spreads already which have the same layouts but with different text frames with different hyperlinked text in each page. So for every 36 pages they’ll have the same master pages applied but the hyperlinks are different after the initial 6 pages with different elements which have separate hyperlinks on top of them - I don’t know if this makes sense at all. 😅
As for the script from @brianp311, this is perfect!!! That’s exactly what I was looking for. You just saved me hours of work! I don’t know how to thank you enough. Thank you so much!!
Copy link to clipboard
Copied
Glad it worked. Also note the try would fail for any items in the pasteboard, and the "bounds" variable line is unnecessary (I was testing the margin issue when I included it).
As far as the work/time saved is concerned, if you feel so inclined, please feel free to make a donation to a nonprofit working to address the current crises (COVID-19 or racial equity).