Quantcast
Channel: Adobe Community : Popular Discussions - InDesign Scripting
Viewing all articles
Browse latest Browse all 15932

Remove hyperlink from a TextItem

$
0
0

Hi,

 

I want to insert a hyperlink on some TextItem. That part I know. But sometimes there is already a hyperlink on the textitem I found, and I get the error #79111:

"The object you have chosen is already in use by another hyperlink."

Is there a way to get the hyperlink or the hyperlinkTextSource on that TextItem and to remove it so I can insert a new one? I have thousands of hyperlinks in my file. I don't want to loop through all the hyperlinks in the document to find that particular one each time I get the error.

Here is the code that throw the error:

txtSource = srcDoc.hyperlinkTextSources.add(txtItem, {  name: "txtsrc_" + style + "_" + destName + "_" + idx  });

 

Thanks


Viewing all articles
Browse latest Browse all 15932

Trending Articles



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