2 Replies Latest reply on Dec 18, 2009 2:40 AM by Kasyan Servetsky

    Relink using applescript

    Mahesh_JW Level 1

      Hi all,

       

      I tried this code but it is not working

       

       

      tell application "Adobe InDesign CS2"
          set the OutputARtFolder to choose folder
          set Err_Folio to "" as string
          set myDoc to document 1
          set myLinks to links of myDoc

         
         (* set missingLinks to id of every link whose status = link missing
          if (count of missingLinks) is greater than 0 then
              display dialog "This document having missing links"
          end if *)

         
          repeat with eachLink in myLinks
              try
                  set theLink to eachLink
                  set thePath to file path of theLink
                  --display dialog thePath
                  tell application "Finder"
                      copy file thePath to folder OutputARtFolder
                      try

                         relink theLink to (OutputARtFolder & name of theLink) as string
                     end try
                  end tell
              end try
          end repeat
         
      end tell

       

       

      it shows the relink error

      Please help

       

      Thanks in advance....