Ah, this is new in CS5.5, I guess it is epub related?
I think you want item.objectExportOptions.applyTagType = TagType.TAG_ARTIFACT;
of course this is epub related. Your snippet works for picture frames. But I need to tag text frames as well (for instance the ones, that have no attached article). This is possible from the user interface, but doing so programmatically, I get the error message "object does not support the property or method".
I guess, there is still sth. concerning the object hierarchy that I do not understand yet. I mean, iterating over all page items is one thing. And applying the right filter the other part of the story – am I right?
I think you are essentially out of luck. It appears to be an omission from the object model that you cannot access the ObjectExportOptions of a text frame.
The following procedure appears to be successful, however; I am not sure there is a practical adaptation of it:
>> r=app.selection [object TextFrame] >> r.contentType 1952412773 >> r.contentType=ContentType.GRAPHIC_TYPE; Error: contentType >> r.contentType=ContentType.UNASSIGNED Error: contentType >> r.contentType=ContentType.TEXT_TYPE 1952412773 >> r.contents adsfdasfadsfds >> r.contents="" >> r.contentType=ContentType.GRAPHIC_TYPE; 1735553140 >> r [object TextFrame] >> app.selection [object Rectangle] >> r.toSpecifier() /document[@id=1]//text-frame[@id=225] >> app.selection.toSpecifier() /document[@id=1]//rectangle[@id=225] >> q=app.selection [object Rectangle] >> q.objectExportOptions.applyTagType 1952928613 >> TagType.TAG_ARTIFACT 1952924006 >> q.objectExportOptions.applyTagType=TagType.TAG_ARTIFACT; 1952924006 >> q.objectExportOptions.applyTagType 1952924006 >> r.contentType=ContentType.TEXT_TYPE 1952412773 >> r.contents="pizza" pizza