Copy link to clipboard
Copied
Hi experts
I got this script.
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
var myDoc = app.activeDocument;
var myMasters = myDoc.masterItems.everyItem();
var myObjects = myDoc.pageItems.everyItem().getElements();
myDoc.pageItems.everyItem().locked = false;
var myLayers = myDoc.layers.everyItem();
myLayers.locked = false;
app.findObjectPreferences = app.changeObjectPreferences = null;
app.findObjectPreferences.fillColor = "Registration";
app.changeObjectPreferences.fillColor = "Black";
app.changeObject();
app.findObjectPreferences = app.changeObjectPreferences = null;
app.findObjectPreferences = NothingEnum.nothing;
app.changeObjectPreferences = NothingEnum.nothing;
app.findObjectPreferences = app.changeObjectPreferences = null;
app.findObjectPreferences.strokeColor = "Registration";
app.changeObjectPreferences.strokeColor = "Black";
app.changeObject();
app.findObjectPreferences = app.changeObjectPreferences = null;
app.findObjectPreferences = NothingEnum.nothing;
app.changeObjectPreferences = NothingEnum.nothing;
app.findTextPreferences = app.changeTextPreferences = null;
app.findTextPreferences.fillColor = "Registration";
app.changeTextPreferences.fillColor = "Black";
app.changeText();
app.findTextPreferences = app.changeTextPreferences = null;
app.findTextPreferences = NothingEnum.nothing;
app.changeTextPreferences = NothingEnum.nothing;
app.findTextPreferences = app.changeTextPreferences = null;
app.findTextPreferences.strokeColor = "Registration";
app.changeTextPreferences.strokeColor = "Black";
app.changeText();
app.findTextPreferences = app.changeTextPreferences = null;
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
but want it either work on every page and every master page.
How can define it?
thanks
Regard
John
Set app.findChangeObjectOptions.includeMasterPages = true and app.findChangeTextOptions.includeMasterPages = true
Copy link to clipboard
Copied
I'm not sure what you mean. This script should work on the entire document. What are you trying to do differently?
BTW, the script has a bug. It should be myDoc.changeObject() and myDoc.changeText() instead of working on the app level.
Harbs
Copy link to clipboard
Copied
Hi Harbs
It work on pages but Master page.
Regard
John
Copy link to clipboard
Copied
Set app.findChangeObjectOptions.includeMasterPages = true and app.findChangeTextOptions.includeMasterPages = true
Copy link to clipboard
Copied
Thank you Harbs
Thank you so much.