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

hyperlinkTextSources from hyperlinkTextDestinations text

$
0
0

Hi Scripters, big question!!!

With two documents open, I have some hyperlinkTextDestinations previously created by text selections.

Now want to create hyperlinks with hyperlinkTextSources refering to the same text used for anchors.

Trying for hours several solutions and roaming the web with no success, here's a test script:

 

 

var myLink = app.documents[0].hyperlinkTextDestinations[0].destinationText.select( );

var mySource = app.documents[0].hyperlinkTextSources.add(myLink);

var myAnchor = app.documents[1].hyperlinkTextDestinations[0];

app.documents[0].hyperlinks.add(mySource, myAnchor);

 

 

The prob is that i get (line 1) an insertionPoint instead a text selection.

 

Any indications appreciated,

regards


Viewing all articles
Browse latest Browse all 37788

Trending Articles



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