1 Reply Latest reply on Jul 31, 2018 8:45 AM by Loic.Aigon

    Change the graphic style to all frames with missing links

    wallaceh3639989 Level 1

      Following the script of this answer,  https://forums.adobe.com/thread/1470744 , it is possible instead of deleting all frames with missing links to leave them at the document but change the graphic style?

        • 1. Re: Change the graphic style to all frames with missing links
          Loic.Aigon Adobe Community Professional
          var link, image, frame,  
          doc = app.activeDocument,  
          links = doc.links,  
          counter = 0;  
            
          for (var i = links.length-1; i >= 0; i--) {  
              if (links[i].status == LinkStatus.LINK_MISSING) {  
                  try {  
                      link = links[i];  
                      image = link.parent;  
                      frame = image.parent;  
                      frame.appliedObjectStyle = "myObjectStyleName"; //or better to use direct reference = doc.objectStyles.itemByName ("myObjectStyleName"); 
                      counter++;  
                  }  
                  catch (err) {  
                      $.writeln(i + " - " + err);  
                  }  
              }  
          }
          

           

          Here you are…

          1 person found this helpful