Script to automatically link page frames?

Participant ,
Apr 13, 2022 Apr 13, 2022

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?

TOPICS
How to , Scripting

Views

122

Likes

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

Adobe Community Professional , Apr 13, 2022 Apr 13, 2022
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; }

Likes

Translate

Translate
Adobe Community Professional ,
Apr 13, 2022 Apr 13, 2022

Copy link to clipboard

Copied

This script may be what you need. 

Likes

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 ,
Apr 13, 2022 Apr 13, 2022

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

Likes

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
Adobe Community Professional ,
Apr 13, 2022 Apr 13, 2022

Copy link to clipboard

Copied

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

Likes

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 ,
Apr 13, 2022 Apr 13, 2022

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...

 

Likes

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
Adobe Community Professional ,
Apr 13, 2022 Apr 13, 2022

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

 

 

Likes

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 ,
Apr 13, 2022 Apr 13, 2022

Copy link to clipboard

Copied

thank you! being able to call out the specific frame will be immensly helpful!

Likes

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
Adobe Community Professional ,
Apr 13, 2022 Apr 13, 2022

Copy link to clipboard

Copied

Cool. To clarify, don't use quotes when naming the frame in your layers panel. 

Likes

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 ,
Apr 13, 2022 Apr 13, 2022

Copy link to clipboard

Copied

LATEST

yep, I'm slowly getting there with my scripting so I recognize the use of them in this script. thanks!

Likes

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