Skip to main content
Participating Frequently
February 18, 2019
Question

How to link primary text frames in existing documents

  • February 18, 2019
  • 2 replies
  • 1236 views

Hi,

So I have a document where I used Data Merge to input 300 images onto each spread. Now that I have a 300-page document, I need to flow in text. I cannot use Smart Text Reflow because this creates and adds new pages, when I just need the overflowing text to simply link to the next (already-existing) text frames.

Is there a way to do this using a script so I don't have to manually connect text frames? I don't know how to write a script from scratch but am familiar with running a few to help my workflow.

Thanks!

This topic has been closed for replies.

2 replies

Srishti Bali
Community Manager
Community Manager
February 21, 2019

Discussion moved to InDesign Scripting

Inspiring
February 23, 2019

You did not specify script language. Here is a simple script written in AppleScript that connects text frames in a document in the order in which they were created. This works using the id of the text frames. You will want to make sure the text frame ids are returned in the correct order (depends on preference settings). The variable at the end of the script (frameList) will allow you to verify the ids of the text frames. If the numbers are in the correct order, remove the (*  and *) and run the script again to link the frames.

set frameList to {}

tell application "Adobe InDesign CC 2019"

  tell document 1

  repeat with i from 1 to count (spreads)

  set pageList to (id of every text frame of spread i)

  set revList to reverse of pageList

  set frameList to frameList & revList

  end repeat

(*set thisFrame to text frame id (item 1 of frameList)

  set numLinks to (length of frameList) - 1

  repeat with i from 1 to numLinks

  set nextFrame to text frame id (item (i + 1) of frameList)

  set next text frame of thisFrame to nextFrame

  set thisFrame to nextFrame

  end repeat*)

  end tell

end tell

frameList

spicyDoge
Known Participant
February 18, 2019
Panzeleny
Participant
May 26, 2022

No, it is not working. There si no scripts for indesign.