5 Replies Latest reply on Jun 8, 2009 6:08 AM by AdobeScripts

    Update Link function throws an error in cs4!

    natarajkt

      Hi,

      Iam using the update() function in the Link class to update a dataLink in the document. But when I execute the update command, Indesign throws an

      error "Error String : update" . Can any one tell me why this doesnt work?

       

      Example:

       

      function UpdateAllOutdatedLinks(){

       

         var myLinks = myDocument.links;

       

         for(var myCounter = myDocument.links.length-1; myCounter >= 0; myCounter--){

       

            var myLink = myDocument.links[myCounter];

       

            if (myLink.status == LinkStatus.linkOutOfDate){

       

               myLink.update();

       

            }

       

         }

       

      }