0 Replies Latest reply on Oct 27, 2010 6:51 AM by Techi Panda

    Creating hyperlink

    Techi Panda Level 2

      Hi scripters


      Here i am trying to create hyperlink by finding emaillink characterstyle below is my work


      var doc=app.activeDocument;
      app.findTextPreferences = app.changeTextPreferences = null;
      app.findTextPreferences.appliedCharacterStyle = "emaillink";
      var emaill = app.activeDocument.findText();
      var maillink= emaill.length;
      if (maillink==0)
      for (q= 0; q<emaill.length; q++)
      var myelink= emaill[q].contents;
      var dest=doc.hyperlinkURLDestinations.add("mailto:"+myelink);   
      var source = doc.hyperlinkTextSources.add(emaill[q]);
      doc.hyperlinks.add(source,dest, {visible:false, name:myelink});


      It works perfect, but its creating name with URL1, I want to create a link [Unnamed] optio. Below is the option screen



      I tried this


      var dest=doc.hyperlinkURLDestinations.add("mailto:"+myelink, {name:"[Unnamed]"});


      but i failed


      Please advice





      a r u l