Copy link to clipboard
Copied
I have a doc with lots of tables & empty cells. Each empty cells have an index markers in it and I need to remove all of them.
The find/change replacing '^I' by '' (nothing) don’t remove them.
Is their a way to remove all Index Markers via a script?
Jean-Claude
Can you send an example idml or inx?
Otherwise perhaps you can try something like this:
var aDoc = app.documents[0];
var allTables = aDoc.stories.everyItem().tables.everyItem().getElements();
app.findTextPreferences = app.changeTextPreferences = null;
app.findTextPreferences.findWhat = "<FEFF>";
app.changeTextPreferences.changeTo = "";
aDoc.stories.everyItem().tables.everyItem().changeText();
app.findTextPreferences = app.changeTextPreferences = null;
alert("done");
This is a part of a script writ
...Copy link to clipboard
Copied
Please be sure that you have no formatting settings in your search&find dialog.
Do you really mean index markers?
Please show us a screenshot with visible hidden characters.
^I (for text) works for me in ID (CS3 and CS5)
also works ~I (for GREP)
Copy link to clipboard
Copied
The index markers are introduce when using datamerge in table. They are not associated with any topics in the Index Panel. They are not searchable. Weird! Some at Adobe are in this case. Thanks!
Copy link to clipboard
Copied
Can you send an example idml or inx?
Otherwise perhaps you can try something like this:
var aDoc = app.documents[0];
var allTables = aDoc.stories.everyItem().tables.everyItem().getElements();
app.findTextPreferences = app.changeTextPreferences = null;
app.findTextPreferences.findWhat = "<FEFF>";
app.changeTextPreferences.changeTo = "";
aDoc.stories.everyItem().tables.everyItem().changeText();
app.findTextPreferences = app.changeTextPreferences = null;
alert("done");
This is a part of a script written by Uwe Laubender. I think this could help you.
Copy link to clipboard
Copied
Wonderfull !
This completely remove the nasty index markers. Be blessed my friend!
Copy link to clipboard
Copied
Perfect, then you can mark your issue as solved.
(and only for info: you don't need the line#2 in the script snippet - I have overlooked this before)
Copy link to clipboard
Copied
Done!
Strange that using the unicode "<FEFF>" will work in a text search in a script, but will not work using InDesign GREP search with \x{FEFF}.
Copy link to clipboard
Copied
@Jean-Claude – True. Because of that I used the TEXT search 😉
Uwe
Copy link to clipboard
Copied
Thank you so much, I've been looking for a solution to this for a while 🙂