I'm having difficulty figuring this one out.
This script works:
var myFormat = app.documents[0].crossReferenceFormats.item("Paragraph Text");
var myXref = app.documents[0].hyperlinks[0];
myXref.source.appliedFormat = myFormat;
This script gives me an error message:
var myFormat = app.documents[0].crossReferenceFormats.item("Paragraph Text");
var myXref = app.documents[0].crossReferenceFormats[0];
myXref.source.appliedFormat = myFormat;
Now, according to the Document model, crossReferenceFormats is a property and [] is a method for that property. So, it seems to me that as hyperlinks is referring to the index of a specific hyperlink, then crossReferenceFormats should be referring to the index of a specific CrossReferenceFormat.
What am i missing?