Applescript relink problem with indesign

Hi
I have a problem with my applescript code on indesign.
The object relink function doesn't work ...

Here is my code :

tell application "Adobe InDesign CS4"
if document 1 exists then
tell document 1
set chem to "TRAFIC:999:999998:Bonzai.gif"
set mylink to name of link 1 as Unicode text
relink link mylink to chem
update mylink
display dialog "ok"
end tell
end if
end tell

This error appears on the relink line : +Link "Bonzai.gif" of document 1 doesn't understand the relink message+
(end of the error message is a translation of french to english)

Any idea ?

Regards

Posted on Nov 24, 2009 5:43 AM

Reply
2 replies

Nov 25, 2009 10:21 PM in response to thegrosboss

Hello

Try something like this. Not tested.


tell application "Adobe InDesign CS4"
if document 1 exists then
tell document 1
set chem to "TRAFIC:999:999998:Bonzai.gif"
set mylink to link 1
relink mylink to chem
update mylink
end tell
end if
end tell

or

tell application "Adobe InDesign CS4"
if document 1 exists then
tell document 1
set chem to "TRAFIC:999:999998:Bonzai.gif"
tell link 1
relink to chem
update
end tell
end tell
end if
end tell


Good luck,
H

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Applescript relink problem with indesign

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.