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

Script to automatically link page frames?

Contributor ,
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

323

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

Community Expert , 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;
}

 

 

Votes

Translate

Translate
Community Expert ,
Apr 13, 2022 Apr 13, 2022

Copy link to clipboard

Copied

This script may be what you need. 

Votes

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
Contributor ,
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

Votes

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

Copy link to clipboard

Copied

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

Votes

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

 

Votes

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
Community Expert ,
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;
}

 

 

Votes

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
Contributor ,
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!

Votes

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
Community Expert ,
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. 

Votes

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
Contributor ,
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!

Votes

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