Folks-
Going from CS3 to CS5 it appears that the relink syntax I’ve been using is no longer valid.
To focus on the syntax itself, I’m using an example StephanK posted, a document with only one link (broken), and the replacement path hard-coded, CS3 changed to CS5:
tell application "Adobe InDesign CS5"
set usedGraphics to links of active document
repeat with i from 1 to count items in usedGraphics
set currentGraphic to item i of usedGraphics
set newpath to "design:Links:Printer_ColorCorrect:2008_2011:42-15117694.tif" -- a string file name
try
relink currentGraphic to newpath
end try
end repeat
end tell
-- started
tell application "Adobe InDesign CS5"
get every link of active document
--> {link id 207 of image id 203 of rectangle id 208 of spread id 186 of document id 20
}
relink link id 207 of image id 203 of rectangle id 208 of spread id 186 of document id 20 to "design:Links:Printer_ColorCorrect:2008_2011:42-15117694.tif"
--> error "Cannot create the link resource from the given URI."number 35869
end tell
-- stopped
Just to be clear, the replacement link does exist:
-- started
choose file
--> alias "design:Links:Printer_ColorCorrect:2008_2011:42-15211694.tif"
-- stopped
I’d appreciate any help.
Thanks,
Ralph