I have some pages with a group in each one, I want to align to left margin all of them.
I have this code:
var myDoc = app.activeDocument; var myGroup = myDoc.pages.groups.everyItem(); myDoc.align(myGroup, AlignOptions.LEFT_EDGES, AlignDistributeBounds.MARGIN_BOUNDS);
But it works only on the first page. I tried to change to "pages.everyItem" but failed. What I have to do?
Thank you in advance.
var myDoc = app.activeDocument;
var myGroup = app.activeDocument.pages.everyItem().groups.everyItem().getElements();
for(i=0; i<myGroup.length; i++)
myDoc.align(myGroup[i], AlignOptions.LEFT_EDGES, AlignDistributeBounds.MARGIN_BOUNDS);
Thank you so much, you guys are the best!