Merge TextFrames Extension for Adobe InDesign

By request—following similar extensions for Flash and Illustrator—here’s an extension for InDesign that merges multiple textframes into one, while retaining the original styles.

Because of properties within InDesign, this extension is actually the most powerful of the three. It accepts characters in the separator field for hard returns, soft returns, and tabs (as well as any combination of any other standard characters).

There are also options in the dialog box that control the size of the textframe once it’s been merged (see the variations in the graphic down the page).

Merge Textframes Extension for Adobe InDesign

Download and instructions below…

Download

Merge Textframes is totally free to use by subscribing to our newsletter.

Enter your information below to get the free download.

You can unsubscribe at any time. I will never spam you or sell your information.

Installation

The download package comes with installers for InDesign CC, as well as CS4 – CS6.

Simply double-click on the installer that matches your setup and follow the onscreen instructions.

There’s also an older version of the script for CS – CS3.

More details provided in the README.txt file.

Usage

Start by select the textframes you want to merge in InDesign (unless you want to merge entire pages).

Running from the Object or Context (right-click) menus

As of v2, you can now get easy access to Merge Textframes from the Object menu, or by right-clicking and choosing Merge Textframes…
InDesign Object menu option

And you can still run it from the Scripts panel.

Running from the Scripts panel

Open the Scripts panel, Windows > Utilities (or Automation pre-CS5) > Scripts.

InDesign Scripts Panel

Locate the MergeTextframes_ID.jsxbin script in the Scripts panel and double-click to run the script. If you installed the script using the CC installer or the MXP file, the script with be in the Ajar Productions subfolder.

Choose options from the dialog

If you’re running InDesign CS4 or newer you will be prompted with a dialog box. The dialog box will allow you to select the orientation of the sorting (top, left, bottom, right), use a custom separator character(s), and select options to fit the merged textframe once complete.

Frame fitting options

Update (6/13/2017)

Version 2.0 adds the following highly-requested features

  • Single-step undo
  • Saves and restores previous settings
  • Lets you merge text frames that are part of a linked story

Plus a CC-friendly installer. 🙂

Update (3/02/2010)

Version 1.1.0 now has the ability to batch-merge textframes within every page of the current document. I had several requests for something like this (including from a recent donor). Here it is! The download links above have been updated.

The new version now has the “Apply to” and “Ignore locked layers” as shown in the image below.

Merge Textframes version 1.1.0 new features

Note that any warning messages about having too few textframes selected have been delayed until after the dialog box appears to reflect the new options.

Thanks for visiting this page and using our extension!

Before you go, grab another free InDesign extension

Need to do the opposite? Grab Split Text to break InDesign text frames apart.

Get updates from Ajar Productions

Sign up today and get the InDesign Split Text premium extension for free!

Unsubscribe at any time. Powered by Kit

153 replies on “Merge TextFrames Extension for Adobe InDesign”

  1. ariyamuthu says:

    Nice… Thanks

  2. Rachel says:

    Hi Justin,
    This script is just what I have been looking for. Unfortunately, I am unable to make it work how I’d like. When I run the script I get the following error:

    JavaScript Error!
    Error Number: 30614
    Error String: Invalid object for this request.
    Engine: main
    Line: 537
    Source: arr[i].previousTextFrame = arr[i-1];

    I am trying to run the script across multiple pages of text boxes using the “all pages” feature, but the script will only combine 1 page of text boxes at a time. (I get the error but the script does actually do its job for one page.) Subsequent pages can also be done, but each page saves into its own separate text box. I have dozens of pages so this is somewhat helpful but I was hoping to wind up with one single text box with text from every single page. Can you help!!?? I am running CS6 on Windows 7

    1. Justin says:

      Hi Rachel,
      If you’d like to email us a small INDD file that replicates the issue, we can take a look.
      support (at) ajarproductions (dot) com.

      1. Steven says:

        It seems I can reproduce this error when trying to merge threaded text frames. So perhaps unthread them first before merging text boxes.

      2. Justin says:

        Thanks, Steven. We’ve found this too and we’re investigating. In the meantime, there is a sample script installed with InDesign the will unthread text frames. Running that first may do the trick.

  3. Steven says:

    I’m also having this issue.

  4. dan says:

    same here, CS6, not seeing an error, but it’s only merging boxes on one page, not all pages as hoped.

  5. dan says:

    Is that how it’s intended? Batch merging each individual page per page? Was hoping to be able to merge all text into one long text box.

    1. Justin says:

      Hi Dan and Steven,
      Are any of your text frames linked?

      1. Dan says:

        No, this was just a test document, I made 3 separate text boxes, 1 on the first page, 2 on the second, and when I run the script it merges the two on the second page but leaves the first.

      2. Justin says:

        Ah, that is how it’s supposed to work. It merges all the text frames on each page, but does not merge across pages. So, if you had 2 text frames on the 2nd page, those would be merged together, but would not be moved to the 1st page.

  6. Isobel says:

    Thanks so much for this script, incredibly handy and saved me a huge amount of time

    1. Justin says:

      Glad to hear it, Isobel!

  7. Bill Siegler says:

    Would love to use this with InDesign CC 2017. Unable to install the extension. Would you be able to fix this?

    1. Kait says:

      I’m also unable to install with InDesign CC 2017, would love a fix!

      1. Kait says:

        I finally figured out to just use the MergeTextframes_ID.jsx file

  8. joseph san andres says:

    Hi,
    Can you help me on how to make the separator be default to \r, no need to enter in the field separator.
    Thanks!

  9. Brian Langhoff says:

    Using this nice little script with CC2017. Works like a charm with two text boxes. Inserting hard return in the prefs and between the two text boxes it inserts this hard return. But as soon as I select 3 or more text boxes, it does not insert this return. The last line of box 1 continues with first line of box 2 etc. …

    1. Brian Langhoff says:

      Tested some more, that was incorrect. It works – UNLESS the text frame has text overflow (ie. little red plus in bottom right corner) – if the text frame is too small it does NOT insert the hard return… 🙂

  10. Thiago Ribnog says:

    Hi!

    Your script save my time a lot! Congratulations!

    But I have one problem. When I have images, objects or a groups of objects anchored in the end of the text frames the hard return delete them. How can I solve this?

    1. Justin says:

      Please send me a 1-page InDesign file that replicates the issue and I will take a look at it.

      1. Thiago Ribnog says:

        Ok!

        I just sent the files!

        A .indd, a .idml and a imagem with before and after running the script.

        The text in the file was just copied from Wikipedia only for the example.

        Thank you!

      2. Justin says:

        Thanks, Thiago!

  11. Roy Behymer says:

    Hi, I just downloaded MergeText yesterday and I’m building a school directory with data supplied via spreadsheet. I’m using InDesign CC 2017’s data merge function and can only get useful merges if I do a single entry per page. In this case, that’s 241 pages with stand-alone, unlinked text boxes. While MergeText does great if I set the a few pages as spreads and links the frames I selected, it does nothing at all if I choose the entire document option. That option is clearly my best choice, if only I could get it to work. Any suggestions?

    1. Justin says:

      Hi Roy,
      Not sure what the problem is without looking at the document. If you merge the entire page and assign a shortcut to the script, you should be able to run all 241 pages relatively quickly (the panel will save your settings each time). It’s not as fast as the document option, but it will probably be quicker than having me look through your file.

  12. I love the script and want to thank you for creating it. It is quite helpful.

    My question is, will there ever be a version that also includes images into the merge?

    We use a program called Catalog Builder that creates Indesign documents from a database. However, instead of creating a flowed Indesign document with one text box, the output is a 5-column page comprised of many text boxes and product photos in their own image box. When I select a column to merge using your script, all the text boxes combine as they are supposed to, but the images stay where they are on the page and do not get included in the merge. I then have to cut and paste each image into it’s appropriate spot within the merged text box. This can be quite time consuming when dealing with many pages. I hope I explained that clearly enough. Again though, thank you for this very helpful script!

    1. Justin says:

      Hi John,

      It would be tricky to try and replicate the “true” location of the images with a script. I think this trick might save you some time if you’re not using it already:
      https://indesignsecrets.com/drag-drop-anchored-objects.php

  13. Ryan Savage says:

    I filled out everything you asked for but never received the email for the download, tried it more than once BUT NOTHING !!!

    1. Justin says:

      I’ve confirmed that the message has been sent. Check your spam/bulk folders.

  14. Christine says:

    This merge text plugin worked PERFECT, saving me so much time when needing to reformat! THANKS!!!

  15. Great, great stuff. Thanks!

  16. Diana says:

    Hi Justin, I’ve tried to download the script for merging text frames but in my inbox the script I downloaded was “Split_Text_ID” and I tried with a friend and he also can download this but I want “MergeTextframes_ID.jsxbin” script and it seems that is not liked with this post. I would appreciate your help. Thanks!

  17. Shannon says:

    Was happy to find this great solution for merging text frames. Saved me a ton of time.

    I’m wondering if you have anything similar that can merge text frames across pages. Currently, I used your script to merge the text frames on each page, but then I have to go manually merge them between pages. Doable, but obviously, time consuming.

    Still happy to have found this as it did save me a ton of time. Hoping you have a suggestion/solution on saving me even more time. 🙂

    Thanks!

    1. Justin says:

      Hi Shannon, Glad you found the tool useful! The challenge would be that I’m not sure that InDesign allows selections across multiple pages. I could be wrong about that, though.

  18. Thomas says:

    Hi Justin, thanks a lot for this great script which I used for a long time. But unfortunately MergeTextframes doesn’t work with InDesign 2023 🙁

    Always following message appears:
    XM error in line 22

    Engine:main
    File: /applications/AdobeInDesign2023/Scripts/Scripts Panel/Ajar Productions/MergeTextframes_ID.jsxbin
    Line: 153

    Uninstall and new installation doesn’t help.

    Do you have any ideas who to solve?

    Br
    Thomas

    1. Justin says:

      Hi Thomas,

      Please send us the smallest sample document replicates the error and we’ll take a look: https://ajarproductions.com/pages/contact.php.

      My guess is that it’s not the InDesign version, but something in the document that is the culprit.

      1. Thomas says:

        It doesn’t matter whether I use a completely new document or an existing one, it just doesn’t work. It doesn’t work with any file. I had also quit and restarted InDesign several times as well as the Mac.

      2. Thomas says:

        Hi Justin, do you have any news for us? We still can’t fix the problem. Even if we create a blank document, insert 2 textframes the problem occurs

    2. Thomas says:

      Hi Justin, do you have any news for us? We still can’t fix the problem. Even if we create a blank document, insert 2 textframes the problem occurs

      1. Justin says:

        Hi Thomas, I’m not seeing it in InDesign 2021, which is what I have on my “everyday” computer. I’ll try to test InDesign 2023 when I have a chance.

      2. Justin says:

        Hi Thomas, I just tested it on InDesign 2023 and it worked just fine. So my guess is there is something peculiar about your InDesign installation or the configuration of the document that is generating an error.

  19. zidane says:

    thank you for the article

Comments are closed. Still have questions?

Contact Ajar