Copy link to clipboard
Copied
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?
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;
}
Copy link to clipboard
Copied
This script may be what you need.
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
in that case, maybe the script in this thread will be of help.
Copy link to clipboard
Copied
i tried that one and it wasnt working. Thank you though ... which some more creative searching, I found this one and works! https://community.adobe.com/t5/indesign-discussions/data-merge-multiple-entries-in-single-text-box/t...
Copy link to clipboard
Copied
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;
}
Copy link to clipboard
Copied
thank you! being able to call out the specific frame will be immensly helpful!
Copy link to clipboard
Copied
Cool. To clarify, don't use quotes when naming the frame in your layers panel.
Copy link to clipboard
Copied
yep, I'm slowly getting there with my scripting so I recognize the use of them in this script. thanks!