Quantcast
Channel: Adobe Community: Message List - InDesign Scripting
Viewing all articles
Browse latest Browse all 37788

Hyperlink Naming Convention

$
0
0

Hi All,

 

I hope following question is very simple for you.....

 

I want to change all the URL Hyperlink source name as like as Hyperlink destination contents.

 

Please refer the screenshot....

 

 

Hyperlink_naming.png

 

In the above screenshot I need to change  "yaho" into "yahoo.com".

 

Kindly give solution for me.

 

Trying Code is below:

 

var myHyperlinks = app.activeDocument.hyperlinks;

 

for (k = 0; k < myHyperlinks.length; k++) {

    var myHyperlinkText = myHyperlinks[k].source.sourceText.contents

     var myTemp = app.activeDocument.hyperlinks.add(myHyperlinkText, {name: myHyperlinkText.contents})

    }

    }

 

Thanks in advance

Beginner


Viewing all articles
Browse latest Browse all 37788

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>