This content has been marked as final.
Show 5 replies
-
1. Re: Go to page in different document when working on a book file.
Harbs. May 27, 2009 3:15 AM (in response to Shlomit Heymann)Hi Shlomit,
Short answer: No.
Long answer: Yes, with a script. Here's a script which does that. The script is a bit fragile. The documents need to be open and the pages must be named with numbers (and not letters or what-have-you...)
//DESCRIPTION: Jumps to a page number in the first open book //AUTHOR: Harbs www.in-tools.com main(); function main(){ try{var book = app.books[0]} catch(e){alert("No Book File Open!");return} var lastNumber=null; var contents = book.bookContents.everyItem().getElements(); for(var i=contents.length-1;i>=0;i--){ //alert(contents[i].constructor.name); if(contents[i] instanceof Document || contents[i].status==BookContentStatus.DOCUMENT_IS_OPEN ){ if(contents[i] instanceof BookContent){ contents[i].getElements(); var fullName = contents[i].fullName; var doc =app.open(File(fullName)); } else { var doc=contents[i]; } lastNumber = parseFloat(doc.pages[-1].name);i=-1; } } if(!lastNumber){alert("Book Documents not Open!");return} var d=app.dialogs.add({name:"Jump To Page Number:"}); var numberBox = d.dialogColumns.add().integerEditboxes.add({minimumValue:1,maximumValue:lastNumber,editValue:1,smallNudge:1,largeNudge:10}); var result = d.show(); if(!result){d.destroy();return} var selectedPage = numberBox.editValue; d.destroy(); for(var i=0;i<contents.length;i++){ if(contents[i] instanceof BookContent && contents[i].status!=BookContentStatus.DOCUMENT_IS_OPEN){continue} if(contents[i] instanceof BookContent){ var doc = app.open(File(contents[i].fullName)); } else { var doc = contents[i]; } var pages = doc.pages.everyItem().getElements(); for(var j=0;j<pages.length;j++){ if(pages[j].name==selectedPage){ app.activeWindow = doc.layoutWindows[0]; app.activeWindow.activePage = pages[j]; return; } } } alert("Couldn't Find the Page! Is Your Document Open?"); }Harbs
-
2. Re: Go to page in different document when working on a book file.
Shlomit Heymann May 27, 2009 3:19 AM (in response to Harbs.)thanks herbs.
how unclever that is, to allow working with book file and not be able to do so...
s
-
3. Re: Go to page in different document when working on a book file.
BobLevine May 27, 2009 5:31 AM (in response to Shlomit Heymann)How about adding a cross reference and then using the go to destination button hyperlinks panel to go to it?
Bob
-
4. Re: Go to page in different document when working on a book file.
Shlomit Heymann May 27, 2009 5:58 AM (in response to BobLevine)got 200 pictures pages... need to go quick to each page del or add a pic.
-
5. Re: Go to page in different document when working on a book file.
Harbs. May 27, 2009 6:33 AM (in response to Shlomit Heymann)Shlomit,
Did the script work for you?



