You can change script function?

Hello world

I had this script:

EN search-replace for MS in the cells

but only in the active document

//=======================================================================================

var doc = app.activeDocument,
_tables = doc.stories.everyItem ().tables.everyItem () .getElements ();

app.findGrepPreferences = app.changeGrepPreferences = null;

for (var i = 0; i < _tables.length; i ++)
{
app.findGrepPreferences.findWhat = "~ =";
app.changeGrepPreferences.changeTo = "~ _ ';"
_tables [i] .changeGrep ();
}

app.findGrepPreferences = app.changeGrepPreferences = null;


//=======================================================================================

I want to run in all open documents

Thank you

Teetan

I think that you can just change the first line to:

var doc = app.documents.everyItem (),

Although I have not tested.

(By the way, there is no reason for the line of app.findGrepPreferences)

be in the loop!)

Tags: InDesign

Similar Questions

Maybe you are looking for