2 Replies Latest reply on Sep 17, 2015 10:40 PM by ivantuniy

    InDesign JavaScript override master page item

    ivantuniy

      Hi guys

      I can't get a Master page item override working.

      In the code below what should I put as destinationPage?

      Currently, I keep getting an error message "Invalid object for this request"

       

      var myDoc = app.activeDocument;

      var myPages=myDoc.pages;

       

      var myItems = myDoc.pages[0].appliedMaster.allPageItems;

              for (y=0; y<myItems.length; y++){

                  if(myItems[y] instanceof TextBox){

                          myItems[y].override(myPages[0]); //This bit doesn't work. What do I put here as destinationPage?

                     }

                    

                  }

      Thanks