Answered
Simple InDesign Script to create new layers
- December 3, 2024
- 2 replies
- 581 views
Hi all,
I'm trying to learn InDesign JavaScripting and I want to run a script in each active document to add two new layers to the bottom of the document.
I've surfed the internet but I can't find anything that makes sense to me, any help would be much appreciated.
This is what I have so far, this is saved as a .js file in my scripts folder;
var myDoc = app.activeDocument.Layer.add({name:"EPub"});
app.activeDocument.Layer.add({name:"TOC"});
It runs and the following error appears, what am I doing wrong?

