Reply To: Indesign Scripting – Hyperlinks

Home Page / Forums / General InDesign Topics (CLOSED) / Indesign Scripting – Hyperlinks / Reply To: Indesign Scripting – Hyperlinks

#14332760
Rory Tyson
Member

After some playing around I have made it do what I want after replacing the Hyperlink section with the below.
I still don’t really understand the {name:app.selection[0].contents} section at the end so if someone is able to point me in the direction or explain a bit more of the theory about how to script hyperlinks it would be greatly appreciated.

var source = app.documents[0].hyperlinkTextSources.add(app.selection[0]);
var dest = app.documents[0].hyperlinkTextDestinations.itemByName(“Destination 3”);
app.documents[0].hyperlinks.add(source,dest, {name:app.selection[0].contents})

This article was last modified on November 20, 2020

Comments (0)

Loading comments...