• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Jump to page in active story

Participant ,
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

125

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

Community Expert , 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 )

Votes

Translate

Translate
Community Expert ,
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 )

Votes

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
Participant ,
Jul 01, 2022 Jul 01, 2022

Copy link to clipboard

Copied

LATEST

Whoa.. great..

It's works by calling the page by Name.

 

Thanks.

Votes

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