Inspiring
November 22, 2019
Answered
InDesign Script: Issue - copy layer items (using Duplicate), in target file layer items reordering
- November 22, 2019
- 5 replies
- 2334 views
When using this Script
//get the layer from the source file
var sourceLayer=inDoc.layers[0];
//make sure we have the correct larget layer
targetLayer=myStagingDoc.layers.itemByName(adorName);
//Copy layer from source to target
sourceLayer.pageItems.everyItem().duplicate(targetLayer);
When it pastes the items into the target document/layer, it is re-ordering the layer items.
I have tried "Remember Paste Layers", Locking Layers, Locking individual layer items.
See the attached images.
The source file shows the correct order.
When pasted into the Target, you'll then see they are re-ordered.
If I do it manually:
Remember Paste Layers is turned on.
In source document, go to layer, CTRL+A to select all, CTRL+C to copy.
Go to target document, CTRL+V to paste and it works.
