Skip to main content
Inspiring
June 22, 2023
Answered

Script to open particular page in multiple documents

  • June 22, 2023
  • 1 reply
  • 526 views

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.

Correct answer rob day

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]
    }
};

 

1 reply

rob day
Community Expert
rob dayCommunity ExpertCorrect answer
Community Expert
June 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]
    }
};

 

MrZZYAuthor
Inspiring
June 22, 2023

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 🙂