Copy link to clipboard
Copied
Hi,
There are several images placed in my documents which name have been changed. Only an extension .eps added in all images name.
Anyone know how to relink images with new name.
Thanks,
Mon
Copy link to clipboard
Copied
I don't know how to Relink images. But I know how to get fullpath of placing images, and how to place Images in rectangles.
We can collect Images filepath,
app.activeDocument.rectangles[0].epss[0].properties.itemLink.filePath
If you only change filenames extension, you can replace the EPS images, and other properties can keep before replace Images.
for (var i=0;i<app.activeDocument.rectangles.length;i++) {
if (app.activeDocument.rectangles.epss.length>0){
var n = app.activeDocument.rectangles.epss[0].properties.itemLink.filePath;
var f = File (n);
app.activeDocument.rectangles.place(f);
}
}
Though it only has to be useful...