Let's clean up!
Hi,
I have a datamerge generated menu that I need to remove all "unwanted characters" from. I found a script, but I always get an error :

for (s=0; s<app.activeDocument.stories.length; s++)
{
for (t=0; t<app.activeDocument.stories.tables.length; t++)
{
app.activeDocument.stories.tables.select();
var sel = app.activeDocument.selection[0];
if(sel instanceof Table)
{
var col = sel.columns;
for(var i=0;i<col.length;i++)
{
var cell = col.cells
for(var j=0;j<cell.length;j++)
{
if(cell.contents == " " || cell.contents == " ") //add your conditions here like double spaces, double non breaking space etc..
{
cell.select();
cell.texts[0].remove();
}
}
}
}
}
}
I'm a novice in scripting, and I need to remove all those unwanted invisible characters.
Any ideas why I get that warning?
Thank you
Patrick
