Announcing Merge Text Extension for Adobe Illustrator

Following the release of my Combine Textfields extension for Flash, I’ve put together a similar extension for Adobe Illustrator. This extension installs a script that will merge text (including text on a path) into one text object, while retaining the style attributes of the individual pieces, including character styles as well as paragraph styles (if the separator includes a return character).

Anyone who’s tried to edit text from a PDF opened in Illustrator knows how frustrating it can be to make simple text edits when the text is broken up. This extension reduces that headache.

Special thanks to David Van Brink for posting the Omino Dialog Maker. His time-saving code was used to produce the dialog box in this extension.

Download Options

Installation Instructions

JSX or JS file:

  1. Place the MergeText_AI.jsx (or MergeText_AI_CS.js) into the Scripts directory within your Illustrator application directory:

Windows > C:\Program Files\Adobe\Adobe Illustrator {version}\Presets\en_US\Scripts
Mac OS X > Applications/Adobe Illustrator {version}/Presets/Scripts

Note: In CS4, the directory path will include a region directory (e.g. Adobe Illustrator CS4/Presets/en_US/Scripts).

MXP file or ZXP file (CS4 or newer):

  1. Double-click on the mxp file to install using Adobe Extension Manager.

Note: Adobe has abandoned Adobe Extension Manager as of CC 2015, even though it’s still installed. You can use the JSX file in that case (installation instructions above).

Update Oct. 2023

You also can try using one of these non-Adobe-built Extension Managers to install the .zxp file.

Usage

In Adobe Illustrator, select the text the you want to merge together and go to File > Scripts > MergeText_AI. If you’re using Illustrator CS3 or CS4, you will be prompted with a dialog box where you can choose your sorting orientation and a custom separator. If you’re using a version earlier than CS3, you will not be prompted with a dialog; the script will run using the default settings sorting topmost, then leftmost, with a separator of “[><]”. You can then run a Find and Replace and replace the separator with the characters of your choice.

Get updates from Ajar Productions

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

Unsubscribe at any time. Powered by ConvertKit

Join the Conversation

  1. Luis says:

    Thanks for this brother! will it work in cs5?

  2. Justin says:

    Hi Luis, it should work just fine in CS5, but you may have to alter the installation directory.

  3. Devon says:

    I get an error message:
    Error 24: newOminoDialog is not a function.
    Line:68
    -> var omd = newOminoDialog(“Merge Textfields”);

    What am I doing wrong? I have a Mac and AI CS4.

  4. Justin says:

    Hi Devon,
    It looks like you’re trying to run the CS1 file in CS4. Download the JSX file or the MXP file above. Either one of those should work fine.

  5. waterionizer says:

    Thanks very much for creating this script.

  6. Herrhumi says:

    Great script! thansk so much!

  7. jimmy says:

    Love it! your just made my evening a lot easier!!

  8. Justin says:

    Glad to hear it! Thanks for the comments, Jimmy and Herrhumi!

  9. Daniel says:

    I am using this in CS5 PC, and when I select the text and try to merge, I get a Script Alert message that says “No textfield selected”. Anyone know why or how to fix? Thanks!

  10. Justin says:

    Hi Daniel,
    Are the textfields locked in any way?

    Is anyone else having this issue?

  11. Claudio says:

    Gracias, excelente desarrollo, no saben cuanto me ayudara!!!

    Genios!!!

    Saludos desde Chile

  12. Justin says:

    Gracias, Claudio!

  13. Dylan says:

    Amazing. What a life saver. Thank you!!!

  14. Justin says:

    Glad to hear it, Dylan! Thanks for your comment.

  15. Kiran Ahire says:

    Hi,

    Very very useful script. Thanks lot.

  16. Jules says:

    THRILLING!!! You just saved me a TON of time. Thank you x a mil.

  17. Justin says:

    Awesome! Glad to hear it, Jules!

  18. Amy says:

    Hi,

    I’m very excited about this product, but I’m running into some issues. It’s working for some text boxes, but for most it gives me the following error:

    JavaScrit Error!

    Error Number: 30614
    Error String: Invalid object for this request.

    (then gives the file location, etc)

    I’ve double checked that I am only selecting text boxes, and still no-go. Any suggestions?
    If it makes any difference, I used PDF2ID to convert this from a PDF, and as you may or may not know, it converts the file into all separated text boxes. I’d love to get around this somehow!
    Thanks!

  19. Justin says:

    Hi Amy,
    I’d be happy to look at this issue. Can you post line number and source that are given when the error occurs?

    Also, let me know which version of AI you’re using. If you can post a copy of the file that would be helpful, too.

  20. Amy says:

    Well, you’re not going to believe this, but since I was messing around with the settings on my PDF2ID, I figured I should re-run the file to give you a fresh one. Guess what- all the paragraphs came in in single text boxes! The sad part is I have NO idea what setting I changed in PDF2ID, but whatever it was, it fixed my issue. Whew. Thanks so much for your prompt response though… I’ll certainly let you know if I run into this issue again!

    p.s. tried your Illustrator one and it works wonderfully- thank you!

  21. KO says:

    yeeeeeee just saved me a bunch of time! Thanks!!!

  22. J says:

    the script does not show up in the menu File > Scripts. it says it’s installed in adobe extension manager, what am i doing wrong?

  23. Justin says:

    Thanks for the comment, KO!

    Hi J, my best guess is that the version of Extension Manager does not match the version of Illustrator that you’re using. Do you have multiple versions of CS applications installed?

  24. HP says:

    cool!

    it runs with the german illu cs5.1, when i move the file from

    C:\Program Files (x86)\Adobe\Adobe Illustrator CS5.1\Presets\en_US\Scripts

    to

    C:\Program Files (x86)\Adobe\Adobe Illustrator CS5.1\Presets\de_DE\Skripten

    thank you!

  25. Justin says:

    Glad to hear it, HP. Thanks for sharing!

  26. LSE says:

    Thanks so much for this script! It’s just what I needed.

  27. Justin says:

    Awesome! Thanks for the comment, LSE!

  28. Dan says:

    WOW! [><] WOW!!! Awesome Justin! Saved me a ton of time! Thank You… -Dan

  29. Justin says:

    Great! Glad to hear it, Dan!

  30. Diana says:

    I can’t wait to use this! I have run into this very problem hundreds of times. Unfortunately after I downloaded the MergeText_AI_en.mxp (CS4 & up – US English) and attempted to use it in my illustrator CS5 I received this error.

    Error22:Window does not have a
    constructor.
    Line: 341
    -> var oD = new
    Window(‘dialog’,name,[100,100,500,500]);

    Thanks in advance!

  31. Justin says:

    Hi Diana,
    This error may be a result of a corrupt preferences file on your system. To reset the preferences in Illustrator: Hold down Shift+Ctrl+Alt (Win) / Shift+Command+Option (Mac) when you start up Illustrator. Hopefully that should resolve the issue.

  32. Oh, wow. Needed art and copy and only had a PDF from the other designer …. didn’t get the .AI file …. This PDF opened particularly messy when brought back to AI and it was going to take me all night to re-join the copy. You saved me hours! Thank you!

  33. Justin says:

    Awesome, James! Glad to hear it!

  34. Justin, thanks so much for this script. Definitely helps.

    Would you know of a way to rejoin text that has been broken into individual letters, each letter being a path (apparently). I’m new to AI and have received this file from a designer where almost every text is broken up into individual letter, for reasons I can’t quite fathom. However, that makes it impossible to manipulate the text, unless I recreate a text object looking the same (which means I have to guess the font, size etc.)

    Here’s a screenshot.

    http://screencast.com/t/xYHOIY02HxSO

  35. Justin says:

    Hi Dan, glad to hear that the script helps!

    Unfortunately, once the text is converted to outlines, there isn’t a good way to get it back.

    Here’s one (admittedly convoluted) idea. Use OCR in Acrobat to recognize the text (in my version it’s found under View > Tools > Recognize Text). You may need to export from AI to high-res (300+ dpi) bitmap for this to work. You can then paste the text into Illustrator.

    Then use WhatTheFont to determine which fonts were used.

    This might save you some time for large documents.

  36. kate says:

    THANK YOU !!! after trying SO many different things, this FINALLY worked!!! it was so much text and i tried it all at once to see if the script could handle it… it stop responding for a little while, but then i walked away for a couple minutes and came back to a fully formed paragraph that was once 5,200 separate characters. THANK YOU!!!

  37. Justin says:

    Hi Kate,

    So glad it was helpful! Thanks for your comment.

  38. Gio says:

    Thanks a lot for this. I had it installed on my computer at work some years ago, then I switched jobs and could not it again. But I finally did!!!!

    Thanks for assisting me with crappy clients 🙂

  39. Justin says:

    Hi Gio, Glad you re-discovered our script! Happy to assist you!

  40. Ekon says:

    Worked like a charm!

    Thanks a lot 😉

  41. Justin says:

    Glad to hear it, Ekon!

  42. Greg says:

    I have loved this extension ever since it first saved the day for me….but now I cant get it to install with the new CC version…such a great tool hope there is a CC update soon?

  43. Justin says:

    Hi Greg,
    I haven’t tested this in CC yet, but you can try changing the file extension from mxp to zxp. It should then install with Extension Manager CC.

  44. Leigh says:

    Any possibility of an update for CC/CC2014? I tried changing the file extension, but that didn’t work. Your extension is the only solution I can find anywhere on the internet, and I can’t use it with my updated applications. 🙁

    1. Justin says:

      Hi Leigh,
      Manual installation of the JSX file should work for CC/CC2014 (instructions above).

      1. Leigh says:

        Yeah, I tried that yesterday before commenting. It doesn’t even recognize the file. Oh well.

      2. Justin says:

        Hi Leigh, I’ve added a ZXP installer (above) and tested it on CC.

    2. Leigh says:

      Just donated so you can buy yourself a Starbucks or something. Thanks for your help!

      1. Justin says:

        Thanks, Leigh! Glad it’s working for you.

  45. Leigh says:

    You are awesome! That did it! However, the file I have from the client has a lot of text sideways, and it doesn’t recognize them as text. But still, this is way better than nothing at all. Thanks!

  46. I’ve tried to install the ZXP file. The extension manager accepted it and says it’s installed, but it’s not appearing in the Illustrator Scripts menu. Should I be looking somewhere else for it?

    1. Never mind. I just spotted the US English bit. I moved the installed file from the en-us folder to en-GB, and it appeared.

  47. awesome script! Question: we have to design a lot of statistical graphs and when we import our files in illustrator, all the textlines are cut into peaces. with your script i am able to connect the lines again, what is awesome.

    BUT: we don’t want ALL the text in ONE peace. it ist still a lot of work if we have to connect the 1000 peaces into 20 different textparts. Is there a chance that it ist possible to select everything and your script connects all the parts that originally belong together (are nearly touching, max. distance in between 1 mm)?

    1. Justin says:

      Hi Barbara,
      The script does have a mechanism to discern proximity, but you can achieve what you’re describing by running the script multiple times, each time only selecting the text fields that you want to merge.

      1. Hi Justin, thank you for your quick response.

        I can run the script multiple times, I know. But our files are quiet complicated and if you have to select the parts that belong together and merch them all seperately it is not really efficient and is time consuming.

        I thought that your script needs a mechanism to discern proximity, is it somehow possible to change the code so it works with running the script only once? I kinda hoped there would be like a single string of code to add and it works 🙂 but I am actually only familiar with html witch is not really helpful in this case.

      2. Justin says:

        Sorry, Barbara. Making a script that smart would be a different task entirely.

Leave a comment

Leave a Reply to Rhiannon Miller Cancel reply

Your email address will not be published. Required fields are marked *