var item=app.activeDocument.legacyTextItems[0]; alert(item.name); item.name="Adobe Illustrator Sample"; alert(item.name);