/t5/indesign-discussions/how-to-import-document-in-a-book/td-p/1143454Mar 11, 2008
Mar 11, 2008
Copy link to clipboard
Copied
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.
/t5/indesign-discussions/how-to-import-document-in-a-book/m-p/1143455#M339485Mar 11, 2008
Mar 11, 2008
Copy link to clipboard
Copied
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
/t5/indesign-discussions/how-to-import-document-in-a-book/m-p/1143456#M339486Mar 11, 2008
Mar 11, 2008
Copy link to clipboard
Copied
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.
/t5/indesign-discussions/how-to-import-document-in-a-book/m-p/1143457#M339487Mar 12, 2008
Mar 12, 2008
Copy link to clipboard
Copied
LATEST
"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.