3 Replies Latest reply on Mar 12, 2008 1:48 AM by Peter Kahrel

    How to import Document in a book

    Level 1
      I am using cs3 (Mac os x).
      I created a book using javascript and then i save it.

      app.books.add(myPath + Save + ".indb");
      app.activeDocument.save(File(myPath + Save + ".indb"), false);

      My question is i need to add or import all the file into that book.
      I need to add all the document into the book these document are in the same folder where i save the book. Is there any way that i can add all the file from that folder to the book.

      --Avi
        • 1. Re: How to import Document in a book
          Level 1
          from VB ObjectBrowser - I hope this helps you:

          Function Add(FullName As String) As BookContent
          Member of InDesign.BookContents
          Create a new Book Content / Return value: The new book content / FullName: Full path name of the new book content

          myBook.BookContents.Add("C:\book\Chapter1.indd")

          robin

          --
          www.adobescripts.com
          • 2. Re: How to import Document in a book
            Level 1
            I need to do three things in this code.

            1) I need to create a book.
            2) THEN ADD all the file in that book(This all file are content in a folder).
            3) Then save this book in the same folder from where i took the file.

            I am trying use

            app.bookContents.add(myPath + Save + ".indb");
            But i am getting error as object does not support the property.
            Can anybody help me to get this three things done.
            • 3. Re: How to import Document in a book
              Peter Kahrel Adobe Community Professional & MVP
              "books" is a property of the app, so to create a new book, you do app.books.add(...). But bookContents is a property of a book, not of the app. Robin said as much in his post, which you chose to ignore.

              Peter