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

Script to open particular page in multiple documents

Engaged ,
Jun 22, 2023 Jun 22, 2023

Is there a way to have each open InDesign document display the same page? I've seen something similar for book files, but the programming was beyond me and I think that was to do with the complexity of book files rather than having, say, 15 InDesign documents open and wanting to check the first, second, or final page each.

TOPICS
Scripting
391
Translate
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 22, 2023 Jun 22, 2023

Hi @MrZZY , This would set all of the open documents’ active page to the front document’s current active page:

 

var d = app.documents
var ap = d[0].layoutWindows[0].activePage.documentOffset;
for (var i = 1; i < d.length; i++){
    if (d[i].pages[ap].isValid) {
        d[i].layoutWindows[0].activePage = d[i].pages[ap]
    }
};

 

Translate
Community Expert ,
Jun 22, 2023 Jun 22, 2023

Hi @MrZZY , This would set all of the open documents’ active page to the front document’s current active page:

 

var d = app.documents
var ap = d[0].layoutWindows[0].activePage.documentOffset;
for (var i = 1; i < d.length; i++){
    if (d[i].pages[ap].isValid) {
        d[i].layoutWindows[0].activePage = d[i].pages[ap]
    }
};

 

Translate
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
Engaged ,
Jun 22, 2023 Jun 22, 2023
LATEST

Can't thank you enough Rob. That works perfectly! I often have to check specific pages in up to 24 documents at a time and it's so handy being able to chain through them with the "next document" shortcut, this cuts out that step every time 🙂

Translate
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