You need to get the ids of the items in the group before you ungroup
them. Then you can use itemByID() to reference them...
Thanks for that.
I will do this later tonight!
OK. I couldn't help trying that in my lunch hour....
I have now written this
myImageID = myGraphic.rectangles.id; //myGraphic has been identified as a group
myGraphic = myDoc.itemById(myImageID); //myDoc is defined correctly
I have also tried replacing the last line with
myNewGraphic = myDoc.allPageItems.itemById(myImageID);
The ID number works, but the last line doeesn't work. Am I using the ItemById in the correct way?
I got there in the end
myPage = myDoc.pages;
myGraphic = myPage.pageItems.itemByID(myImageID);
seems to work.
Thanks again Harbs