13 Replies Latest reply on Aug 7, 2017 1:32 PM by Peter Kahrel

    indesign cc 2017 - script to turn off/on layer(s) in open documents?

    briann57175377 Level 1

      Hi, I found a code to turn off or on a layer(s) by invoking it in indesign from here.

      Short Cut Keys to Make Layers visible in In Design CS 5.5


          app.activeDocument.layers.item("Some Layer Name 1").visible = true;

          app.activeDocument.layers.item("Some Layer Name 2").visible = true;


      It works by changing the names of the layers you want to turn off or on and setting the flag to true or false. If the layer doesn't exist, it will ignore it.


      But how do i incorporate into a script that will apply to all open documents, instead of single doc? I've been googling and couldn't find similar sample.