Skip to main content
LynxKx
Inspiring
April 13, 2022
Answered

Script to automatically link page frames?

  • April 13, 2022
  • 8 replies
  • 1017 views

After doing a data merge, I need all the text frames to link so they are all flowing together. Is there a script that will do that? possibly calling out a specific object style used for that text frame?

This topic is closed to new replies. Start a new post to keep the conversation going.
Correct answer brian_p_dts

Name the text frame on your template layers panel before running the merge, then try this on the merged document.  In this case, the text frame would be named "templateFrame".

var ps = app.activeDocumment.pages;
var ct, nt;
for (var i = 0; i < ps.length - 1; i++) {
    ct = ps[i].textFrames.itemByName("templateFrame");
    nt = ps[i+1].textFrames.itemByName("templateFrame");
    ct.nextTextFrame = nt;
}

 

 

8 replies

Legend
April 13, 2022

This script may be what you need. 

LynxKx
LynxKxAuthor
Inspiring
April 13, 2022

this one is merging multiple text frames on a page, my data merge exports out 100 pages with one frame per page and I need to link all the text frames across the document. this doesnt work for that

Legend
April 13, 2022

in that case, maybe the script in this thread will be of help.