I try to loop through a selection to modify the fill color of the the selected items in InDesign using ExtendScript. Some of the selected items are grouped.
var mySelection = app.selection;
for (var myIndex in mySelection) {
var myPageItem = mySelection[myIndex];
myPageItem.fillColor = app.activeDocument.swatches.item("Black");
}
The fill color of the selected items is not modified.
How can I loop through a selection to modify the fill color of the the selected items in InDesign using ExtendScript?
I thank you for your help.