Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Moving Layers from One File to Another?

New Here ,
Sep 15, 2025 Sep 15, 2025

Hello, everyone.

 

I have a question, that I suspect I know the answer to already... but I need to ask, in the event that someone might be able to identify aworkaround. Here's my dilemma:

 

I work on ads for a major retail chain, and at the very end of Production, we have to make updates to our products star ratings reviews to the most recent number — which have grown since the time we began production. Problem is, it's tedious and time-consuming. I am trying to devise a way to automate, if not simplify, this process.

 

My first idea was to create a new file and import, via our automation process, updated reviews (which reside on their own Layer) from one InDesign file to another. If I could move an entire layer from one file to the next, it would be the silver bullet. Unfortunately, InDesign does not appear to allow one to move an entire layer the way it allows you to Move Pages or Append Style Sheets, etc.

Does anyone have any ideas on how I might be able to execute this move without the need to manually copy-paste dozens of updates per Project?

 

Thanks so much.

TOPICS
Experiment , Feature request , How to , Import and export , Scripting
207
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 15, 2025 Sep 15, 2025

I'm guessing this could be scripted...not by me, mind you...but it seems simple enough even manually. Lock the other layers, select all, copy and then paste in the other file.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 15, 2025 Sep 15, 2025

I only thought that InDesign could copy from one page at a time — not an entire layer. These are multi-page files I work with. Sometimes, over 100 pages with these star review elements on each of them.

Thank you for the reply!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 15, 2025 Sep 15, 2025

That is a limitation of copying and pasting in InDesign, but it wouldn't be hard to work around that limitation in a script. I can imagine making an array of all pages in the source doc, verifying that you had an open target doc with the correct number of pages, then looping through those pages one by one, copying all of the content in the specified layer, pasting it into the corresponding layer on the corresponding page of the target doc. I wouldn't guess that this would be the easiest way to do it - I'm not looking at your entire workflow, so I might well be wrong about that - but it's absolutely doable. 

 

Is it just numerical data that needs to be updated at the end of production? "4.5 stars, 382 votes" or something along those lines? How do the new star-counts get delivered to you? Lots of possible automation possibilities there... e.g. the numbers of stars and numbers of votes could be stored in placed-and-linked text files. Update those text files, then the next time you open the INDD and are prompted to update links, and all of those files would get updated. Or you could tag every review with XML tags, then Import XML with new values whenever your reviews get updated? 

 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 15, 2025 Sep 15, 2025

Thanks for that reply.

 

Yes, there is a data base where these reviews reside. We conduct a "data merge" at the start of our production process of any given "event". The latest data for star reviews is brought in with everything else (copy, pricing, images, etc.). But even before we begin work, the reviews for many products have already gone up (hopefully — lol). By the time we are finished, and  ready to distrbute our files to the stakeholders, they will have changed that much more. So...


I was thinking, if I could create a new "data merged" file from the latest-greatest star review data, I could then take that layer and "move" it to my live file — using a script or however — replacing the out-of-date reviews.

 

Thanks so much.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 15, 2025 Sep 15, 2025

"Is it just numerical data that needs to be updated at the end of production? "4.5 stars, 382 votes" or something along those lines?"

 

Yes, exactly.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 15, 2025 Sep 15, 2025

I wonder - are you using the Data Merge tool that is part of InDesign? Or are you maybe using some kind of third-party plugin or tool. Because there's a very easy answer if 1) you're using the same Data Merge panel that is part of InDesign, and 2) all you're merging in is the review data, then there's a handy tool to "Update content in merged fields":

fuie.png

 

But if you're a TypeFi user, or an InData user, and/or if your data merge process is actually building large parts of your document (not just the reviews) then just updating the merged fields won't work for you. That's what I am getting from your description - the Data Merge assembles the entire document in rough form, and then you need to put significant effort into finalizing it, so simply updating the data field content would most likely set the clock back and undo a lot of the finalization-effort you'd just put in.  

 

If I were in your offices, consulting on workflow design, I would most likely say that the problem is actually upstream from you; it'd be better to fix how the document is assembled, so you didn't have this post-cleanup step. I might also argue for a commercial solution - e.g. building your catalog with a tool like InData or InCatalog, instead of doing it all with InDesign's vanilla Data Merge tool - but either argument would require a deeper understanding of your workflow than we're likely to get by just conversing on a forum.  So maybe the layer-copying dodge really is the fastest way to get to a completed project? 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 15, 2025 Sep 15, 2025

Hi @Darling_0124 it would be worth posting a demo of your set up—just a few pages and a couple of .indd documents and a sample of the review data (.csv or .xlsx or .json?) corresponding to the demo documents.

- Mark

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 16, 2025 Sep 16, 2025

Hi @Darling_0124 ,

we already discussed the issue a couple of years ago with a scripted solution by @heatherw6960836 here:

 

InDesign Script: Issue - copy layer items (using Duplicate), in target file layer items reordering
@heatherw6960836 , Nov 22, 2019

https://community.adobe.com/t5/indesign-discussions/indesign-script-issue-copy-layer-items-using-dup...

 

See my comments to circumvent the problem, that in scripting with duplicate() the stacking order of elements in the target is in reverse order. My solution: "Simply" duplicate the page items of a layer first to yet another document and then duplicate the layer's page items from that to the final document.

https://community.adobe.com/t5/indesign-discussions/indesign-script-issue-copy-layer-items-using-dup...

 

Or look into @heatherw6960836 's solution, that would perhaps not directly suit your needs where Heather is using copy() and pasteInPlace() spread by spread:

https://community.adobe.com/t5/indesign-discussions/indesign-script-issue-copy-layer-items-using-dup...

 

Kind regards,
Uwe Laubender
( Adobe Community Expert )

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 16, 2025 Sep 16, 2025

Hi @Darling_0124 ,

below my scripting solution from this other thread written in ExtendScript.

I did a lot of comments there. Please read them before trying the script code.

 

You have to edit the code and insert the right names for the source layer and the target layer.

Both names could be the same. Make sure, that you change "SourceLayer" to "TheNameOfYourLayer" and do that also with "TargetLayer".

 

/*

IMPORTANT NOTES:

The code below works with ONLY two documents open.

sourceDoc : the active open document
targetDoc : the other open document

Make sure that the target document has the same number of pages like the source document.
Make sure that the target document has the named layer you want to duplicate items to.

*/


// The open, active document is the source:
var sourceDoc = app.documents.itemByID( app.documents[0].id );

// The second open document is the target:
var targetDoc = app.documents.itemByID( app.documents[1].id );

// The name of the source layer:
var sourceLayerName = "SourceLayer" ;

// The name of the target layer, that must be already there in the target document.
// Both names could be the same.
var targetLayerName = "TargetLayer" ;

var sourceLayer = sourceDoc.layers.itemByName( sourceLayerName );
var targetLayer = targetDoc.layers.itemByName( targetLayerName );

// Here comes the workaround for the problem reverse order of elements after using duplicate:

var tempDoc = app.open
(
	targetDoc.fullName , true , OpenOptions.OPEN_COPY
);

var tempLayer = tempDoc.layers.itemByName( targetLayerName );

// That produces a reverse order of the original stacking order of elements:
sourceLayer.pageItems.everyItem().duplicate( tempLayer );

// That re-produces the original stacking order of elements in the target document:
tempLayer.pageItems.everyItem().duplicate( targetLayer );


// Close the temp document without saving:
tempDoc.close( SaveOptions.NO );

 

Kind regards,
Uwe Laubender
( Adobe Community Expert )

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Sep 16, 2025 Sep 16, 2025
LATEST

Hey @Darling_0124 

There is already a script done for that 😉

it's rather robust. I've used it quite a few times and worked great.

https://github.com/AdobeInDesignScripts/indesign-copy-layer

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines