Thank you. To narrow it down, I want to find text that has the character format "Link" and add a gotolink hypertext marker. For example, in the phrase: "The quick brown fox jumped over the lazy dog," the word "over" has the character format "link" and I want it to click to somewhere else on the page.
I can find the character format in my document with this:
var doc = app.ActiveDoc;
function findLink(doc) { // looks for the character format Link
charFmt = doc.GetNamedCharFmt("Link");
if(charFmt.ObjectValid() == true) {
//Get the character format properties
alert("Format found.");
}
//If we didn't find the character format, a warning....
else alert("Could not find the Link character format!");
}
findLink(doc);
but I can't figure out how to get it to apply the gotolink marker.