Copy link to clipboard
Copied
I'm somewhat ok with scripting, but having problems.
I have a script that I'd like to relink missing links to a certain folder, but it's not linking when I run the script.
Any idea what I have wrong here? This is the portion out of my much bigger script I'd like to fix:
tell application "Adobe InDesign CS6"
tell active document
set allLinks to every link whose status is link out of date
repeat with thisLink in allLinks
relink thisLink to POSIX file path "Volumes:Documents:WORKING:As Needed Items & Scripts:_Rugs:"
end repeat
end tell
end tell
I have hundreds of indd files to deal with monthly from my customer. Instead of the customer sending me the same 7-800 links all the time, I'd like to just run this script and relink all to a specific folder where I have all their links archived.
Hi, Try this:
tell application "Adobe InDesign CS6"
tell active document
set allLinks to every link whose status is link out of date
set myPath to "Volumes:Documents:WORKING:As Needed Items & Scripts:_Rugs:"
repeat with thisLink in allLinks
try
set currFileName to name of thisLink
set newPath to myPath & currFileName
relink thisLink to newPath as alias
end try
end repeat
end tell
end tell
gr
Copy link to clipboard
Copied
Hi, Try this:
tell application "Adobe InDesign CS6"
tell active document
set allLinks to every link whose status is link out of date
set myPath to "Volumes:Documents:WORKING:As Needed Items & Scripts:_Rugs:"
repeat with thisLink in allLinks
try
set currFileName to name of thisLink
set newPath to myPath & currFileName
relink thisLink to newPath as alias
end try
end repeat
end tell
end tell
gr
Copy link to clipboard
Copied
Thanks greenkookie! That work perfect. I did make 1 minor change from
set allLinks to every link whose status is link out of date
to
set allLinks to every link whose status is link missing
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more