Link update in InDesign CS4 JS
Hi, I need some help. This loop use to work, but know it's giving me an error, and when I added the alert I see that it's giving me only first letter of the file's name. Could you help me to find out what happened.
for (var a =0; a<app.activeDocument.rectangles.length-1; a++){
myArt = app.activeDocument.rectangles.graphics[0];
myArtName = myArt.itemLink.name[0];
alert (myArtName);
myArt.itemLink.update (myArtName);
}
Thank you very much.
Yulia