Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #target indesign
- var doc;
- var footnoteCount=1;
- if((app.books.length==1) && (app.documents.length==0)) {
- var bookFiles=app.books[0].bookContents.everyItem().fullName;
- if(bookFiles.length>1) {
- doc=app.open(bookFiles[0], false, OpenOptions.OPEN_ORIGINAL);
- setFootnoteOptions();
- for(var i=1; i<bookFiles.length; i++) {
- footnoteCount+=doc.stories.everyItem().footnotes.everyItem().id.length;
- doc.close(SaveOptions.YES);
- doc=app.open(bookFiles[i], false, OpenOptions.OPEN_ORIGINAL);
- setFootnoteOptions();
- }
- doc.close(SaveOptions.YES);
- }
- }
- function setFootnoteOptions() {
- doc.footnoteOptions.restartNumbering=FootnoteRestarting.DONT_RESTART;
- doc.footnoteOptions.startAt=footnoteCount;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement