Jump to page in active story

Explorer ,
Jun 30, 2022 Jun 30, 2022

Copy link to clipboard

Copied

I have two diff stories in my InDesign file.
 
In the first story there are two Table of contents pages. and in the second story there is actual content.
 
How to jump to an active story s page only.
 
Using below code to Jump to a specific page but it is considering TOC pages also.
 
eg. when I jump to 23 rd page, it actually jumps to the 21 st page.
 

var doc = app.documents[0];

 
var page = doc.pages.item(Number(23));
app.activeWindow = doc.layoutWindows[0];
app.activeWindow.activePage = page;
 
Thanks in advance.
TOPICS
How to , Scripting

Views

42

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Adobe Community Professional , Jun 30, 2022 Jun 30, 2022
Hi @Hetal5C4C , it's perhaps more the 24th page in the document and not simply page 21 ( both could be true of course ), because counting begins with 0. doc.pages[0] or doc.pages.item(0) is the first page in any document. Test this to call the page by name: var page = doc.pages.itemByName("23"); Regards, Uwe Laubender ( Adobe Community Professional )

Likes

Translate

Translate
Adobe Community Professional ,
Jun 30, 2022 Jun 30, 2022

Copy link to clipboard

Copied

Hi @Hetal5C4C ,

it's perhaps more the 24th page in the document and not simply page 21 ( both could be true of course ), because counting begins with 0. doc.pages[0] or doc.pages.item(0) is the first page in any document.

 

Test this to call the page by name:

var page = doc.pages.itemByName("23");

 

Regards,
Uwe Laubender
( Adobe Community Professional )

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 01, 2022 Jul 01, 2022

Copy link to clipboard

Copied

LATEST

Whoa.. great..

It's works by calling the page by Name.

 

Thanks.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines