0 Replies Latest reply on Jul 29, 2009 5:32 AM by dhishok

    set hyperlink destination...

    dhishok Level 1

      Hi everyone,

       

      At present i am working with InDesign CS4. I am finding "CT" paragraph style applied contents and i want to fix this contents as new hyperlink destination. These are the marginal terms. Then i have to find the cross reference of this marginal terms in the main column which is "HT" character style applied content and make this to new hyperlink. if the contents of the CT match with marginal terms then i have to link the hyperlinks and destination.


      Find my script below.

       

      app.findTextPreferences=app.changeTextPreferences=null;
      app.findTextPreferences.appliedParagraphStyle="MT";

       

      myFind=app.findText(true);
      for(i=0;i<myFind.length;i++){
      alert (myFind[i].contents);
      myLink=app.activeDocument.hyperlinkTextDestinations.add(myFind[i].insertionPoints[0]);
          }
      alert ("Done");

       

      Can anyone help me for this. Thanks in advance.
      Thiyagu