Hi,
In case of your question you should modify the line:
a = doc.allGraphics,
with:
a = doc.pages.itemByRange(3,-1).allGraphics,
but basically:
are you going to apply objectStyle to a graphics (images, pdfs, eps, etc) or to a frames which are their containers (rectangles, ovals, etc)?
Jarek