Copy link to clipboard
Copied
Is there any way to validate the Hyperlinks already added in the indesign document.
Hi,
Below is the snippet that will help you to tell whether hyperlink exists or not.
var doc = app.activeDocument;
var _hyperLink = doc.hyperlinks.itemByName('test');
if(_hyperLink.isValid)
alert("Exists");
else
alert("Not exists");
Assuming, hyperlink with name "test" exists in teh indesig document.
Copy link to clipboard
Copied
Look into the Hyperlink panel.
Copy link to clipboard
Copied
Hi,
Below is the snippet that will help you to tell whether hyperlink exists or not.
var doc = app.activeDocument;
var _hyperLink = doc.hyperlinks.itemByName('test');
if(_hyperLink.isValid)
alert("Exists");
else
alert("Not exists");
Assuming, hyperlink with name "test" exists in teh indesig document.
Copy link to clipboard
Copied
This would do the trick.
Copy link to clipboard
Copied
Can you be more specific? If you want to check if a block of Text has hyperlinks, you can use myText.findHyperlinks(), which will return an array of all hyperlinks in that text (array length can be 0)