2 Replies Latest reply on Feb 28, 2012 10:59 AM by CambLSAT

    Trouble with loadMasters function.

    CambLSAT Level 1

      Hey everybody,

       

      I'm trying to automate the replacement of a number of master spreads across many documents. Unfortunately, I keep getting the following error:

      Error Number: 48

      Error String: Cannot find the folder " ".

       

      Both of these code snippets give the same result:

       

      var oldDocument = File("/c/Users/me/Desktop/Template.indt")
      myDocument.loadMasters(oldDocument.fullName);
      

       

      myDocument.loadMasters(File("/c/Users/me/Desktop/Template.indt").fullName);
      

       

      If I have the document open from which I'm loading the masters, the following code works:

      myDocument.loadMasters(app.documents.item("Template.indt").fullName);
      

       

      The problem is, I don't want to have that file open while performing the script. Thanks in advance for your help!