I am new to this forum, and I have a rather urgent job I need to complete for a client. Unfortunately I dont not know anything about scripting (except for clicking existng presets).
I have a tyesetting project in Indesign CS4 that I have created a data merge from Excel.
This created a table for each entry and a cell for each line entry. One of my line entries has a prefix of "Email: ", which I did in the Indesign Template. This obviously inserts the text Email: before the email address. Most cells have been filled with data, but I still have a few remaining that are blank. I was wondering if there is a way to search the entire document for "Email:" and remove those cells. I need to clear that I do not remove an active cell as in "Email: firstname.lastname@example.org".
Here's an example of what I mean:
Any help appreciated. Any links I can review would be great to.
Thanks in advance.
To warm up the fingers (and the brain cells):
app.findGrepPreferences = null; app.findGrepPreferences.findWhat = "Email:\\s+\\Z"; empties = app.activeDocument.findGrep(true); for (i = 0; i < empties.length; i++) if (empties[i].parent instanceof Cell) empties[i].parent.parentRow.remove();
This deletes all rows in which "Email:" is not followed by any text. Save your document before trying!
Unfortunately I do not know how to implement the script in ID.
After digging around I worked out how to enter the JS into Indesign.
Works beautifully. Thank you.