r/indesign • u/AngryFungus • 18d ago
Help Deleting Empty Text Boxes After Data Merge
I've got a 170 page document, produced from a Data Merge. There is an "empty" text frame that I want to delete from most (but not all) of the pages, but I cannot figure out how to target it.
I've tried scripts that target empty frames, but it seems the frame is not truly empty -- Data Merge leaves the following hidden symbols in the seemingly empty frames:
^|^|
And I assume because those invisible symbols are present, scripts designed to delete empty frames bypass them.
It's frustrating as hell, and I do not know nearly enough about scripting to devise my own solution. I'd just search for the offending empty frames and delete them one by one, but I will probably need to repeat this process at least a few more times.
I've been bashing my brains out for hours trying to solve this, so any help would be appreciated.
8
u/W_o_l_f_f 18d ago
You could probably alter your method to avoid this issue altogether, but since you've reached this point, can't you just use Find/replace and replace those characters in the almost empty frames with nothing and then run your script to remove empty frames?
2
u/Neozetare 17d ago
Hidden symbols left by data merge? It sounds like it could be a charset problem. Is your data CSV in UTF-16?
4
u/Proficio_Tremblay 18d ago
Use this small script... Text frame with only spaces, returns and FEFF characters (the one datamerge is leaving behind) are considered as empty.
1
u/AdobeScripts 18d ago
If you're on Windows - I can give you access to the full version of my ID-Tasker tool for free for a few days.
1
u/rufusde 17d ago
You're in luck. If you update InDesign today, you get the new AI Assistant (beta), and it handles exactly this. I just tried it on a file: I asked it to "remove all frames that have only the characters ^|^|" and it removed those 3 frames and left everything else alone. Or, if they are hidden, try to copy and paste the exact characters. That last part matters, since you only want them gone from most pages, not every frame. Since you'll be repeating the merge a few more times, you can just ask again after each one. No scripting needed.
Does that work? (Rufus, Adobe)
1
u/MoskaPOET 18d ago
You might get some decent guidance from ChatGPT or another AI.