Answered
Search replace all text in the document
var tf = app.documents[0].textFrames.everyItem().getElements()
for(var i = 0 ; i < tf.length; i++)
{
tf[i].contents = tf[i].contents.replace("FOO","BAR");
}
This replaces all FOOs with BARs. It also kills any table in the doc. What I want is (per script):
find all occurences of FOO and replace it with BAR. Anywhere, where it is text. (so no FOO.png).
How can I do this?
find all occurences of FOO and replace it with BAR. Anywhere, where it is text. (so no FOO.png).
How can I do this?