1 Reply Latest reply on Apr 11, 2008 3:33 PM by (Robert_Tkaczyk)

    Books and documents

      I'm a novice scripter with very little experience with JavaScript. I'm trying to convert an AppleTalk script to JavaScript. I've been able to create a book and now I want to add documents to it. This is the code I'm using:

      // Create book
      var myBook = app.books.add(fullName=SOIPath+"PW.indb");
      // Add the front cover
      myFilename = myPath+"Modules/my_Cover.indd"
      myBook.bookContents.add(File(myFilename));

      When I call the bookContents.add function, I get a SaveAs dialog with my file name filled in. Can someone please tell me what I'm doing wrong?