Skip to main content
BEGINNER_X
Legend
July 25, 2014
Answered

Missing HyperlinkTextDestination(Text Anchor)

  • July 25, 2014
  • 1 reply
  • 317 views

Hi All,

I need a alert length of missing hyperlink Text Destination.

var myTextDes = app.activeDocument.hyperlinkTextDestinations.everyItem().getElements();

alert(myTextDes.length)

Need length of Text anchor is missing( which is in red color flag).

See below Screenshot:

Could anyone please response ASAP.

Thanks in advance

Siraj

This topic has been closed for replies.
Correct answer Sajeev Sridharan

You can validate using hyperlink class rather than HyperlinkTextDestination,

Try this,

var myTextDes = app.activeDocument.hyperlinks;

for(var i=0; i<myTextDes.length; i++)

{

     if(myTextDes.destination == null)

     {

        alert(myTextDes.name);

    }

}

Vandy

1 reply

Sajeev SridharanCorrect answer
Legend
July 25, 2014

You can validate using hyperlink class rather than HyperlinkTextDestination,

Try this,

var myTextDes = app.activeDocument.hyperlinks;

for(var i=0; i<myTextDes.length; i++)

{

     if(myTextDes.destination == null)

     {

        alert(myTextDes.name);

    }

}

Vandy