var myTags=app.activeDocument.pageItems[0].tags; alert(myTags.length); myTags.removeAll(); alert(myTags.length);