0

Currently I have been using the following in older InDesign version ...

//GROUP AND SELECT ALL ITEMS ON PAGE 1-----------------
myItems1 = app.activeWindow.activeSpread.pageItems;
app.activeWindow.activeSpread.groups.add(myItems1);
app.select(myItems1);

Currently I am getting an error in InDesign CC saying ... that the middle line within the above code is an error string: Invalid Parameter. I have been searching what has changed and so far I am not finding anything on this.

I need to group all items on an active spread (page).

James
  • 561
  • 2
  • 7
  • 19
  • Just found that after running the script that includes the above on a test layout I created a few years ago and all works well. So it is what is in the documents today that is creating this issue. So I will see what it is and post it here when I find out. – James Apr 13 '17 at 19:45
  • Do you maybe run the snippet on a page that contains only one page item? In this case the snippet would throw an error, so you would need to add an extra check, if you actually have more than 1 page items. The above snippet works fine for me, as long as I have several page items. – mdomino Apr 14 '17 at 19:19
  • Also, check if you already have groups on the layout – Nicolai Kant Apr 18 '17 at 13:31

0 Answers0