1 Reply Latest reply on Jan 30, 2015 7:51 PM by sreekarthik.k@gmail.com

    Hyperlink for images

    Level 1

      How to apply hyperlink for images. Please advice

        • 1. Re: Hyperlink for images
          Level 1

          var myDoc = app.activeDocument;   

             

          var  myGr = app.activeDocument.links;   

           

           

          //    var myLink = myDoc.links; 

           

           

          //alert(myGr.length)   

             

           

              for(a=0; a<myGr.length; a++)   

              {  

                try{  

                  var myGrName = String(myGr[a].name);   

                  var mySplitName = myGrName.split(".")[0];

                  app.select(myGr[a].parent)   

                  myHyperlinkPageItemSource =  app.activeDocument.hyperlinkPageItemSources.add(app.selection[0])   

                  var myHyperlinkURLDestination = app.activeDocument.hyperlinkURLDestinations.add( String(mySplitName));  

                  var myHyperlink = app.activeDocument.hyperlinks.add(myHyperlinkPageItemSource, myHyperlinkURLDestination, {name:  String(mySplitName)})     

                  } catch(e){}   

              }   

           

             

          alert("Process Completed")