Hi Script Legends,
I am entirely new for hyperlink concept.
Requirement:
In the active document Hyperlink having "Link to Page" property. My requirement want to check the destination page.
Suppose that page should be blank page then the hyperlink want to be delete.
Using forum I try the below script:
var myDoc = app.activeDocument
//~ var myHyperlink = myDoc.hyperlinks.everyItem().getElements()
//~ alert(myHyperlink.length)
var myPageDestination = myDoc.hyperlinkPageDestinations.everyItem().getElements()
alert("myPageDestination:" + myPageDestination.length)
var myPageItems = myDoc.allPageItems
alert("myPageItems:" + myPageItems)
for(j=0; j<myPageDestination.length; j++)
{
if(myPageDestination[j].pages[0].allPageItems == 0)
{
app.activeDocument.myPageDestination[j].remove()
alert("sucess")
}
}
Could anyone please rewrite my program. It should be very helpful for me.
Thanks in advance
Beginner