app.activeDocument.changeText(); // changeText() is proceeded in whole doc
app.selection.changeText() // changeText() area set to selection only;
myTF.changeText() // changeText() area set to text frame named "myTF";
So your challange is to find a way to name your changeText() destination.
It depends on your doc structure. If tables are in separated frames should be easy.
But you have to say something about it.
Oh, I see. So every table in the document is in a separate frame.
How can I select the textframes only? Must I use "switch" and then "parentTextFrames" or "parentStory"?
And can I use "app.loadFindChangeQuery" for that?
I think I have to build a loop instead of simply change all texts and define a var like "myTF", is that right?
First many thanks for your helping
1 person found this helpful
So if we want to exclude textFrames with tables
I suggest to proceed find/change procedure in 2 steps.
1. myFound = myDoc.findText();
You have an array with every findText() results.
2. Hide changeText() into the loop statement:
var k = myFound.length;
if (myFound[k].parent.constructor.name !== "Cell")
This should change text only if its parent is not a table cell.
Thanks a lot, I will try asap.