2 Replies Latest reply on Apr 19, 2011 5:52 AM by Oviya...

    HyperLink for word

    Oviya... Level 1

      Hi Friends,

       

      How to apply hyperlink for a word in InDesign CS5 java script....?

       

      Thanks,

      Divya.

        • 1. Re: HyperLink for word
          Oviya... Level 1

          I have tried this code for apply hyperlink for a word in InDesign CS5 java script

          But this code is not working....

          Please Update me the correct code friends....

           

           

          var myDocument = app.documents.item(0);


          myHyperlinkURL = myDocument.hyperlinkURLDestinations.add("/Desktop/Images/calendar.gif");


          myHyperlinkSource = myDocument.hyperlinkPageItemSources.add(myDocument.pages[0].textFrames[0].paragraphs[0]);


          myHyperlink=myDocument.hyperlinks.add(myHyperlinkSource,myHyperlinkURL );


          myHyperlink.visible = true;

          • 2. Re: HyperLink for word
            Oviya... Level 1

            Right script for HyperLink

             

             

            var myDocument = app.documents.item(0);

             

            myHyperlinkURL = myDocument.hyperlinkURLDestinations.add(File("/Desktop/flower.png"));

             

            myHyperlinkSource = myDocument.hyperlinkTextSources.add(myDocument.textFrames[0].paragraphs[0]);

             

            myHyperlink=myDocument.hyperlinks.add(myHyperlinkSource,myHyperlinkURL);

             

            myHyperlink.visible = false;

             

            Thanks,

            Divya.