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

Scripting Error

$
0
0

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?


Viewing all articles
Browse latest Browse all 15932

Trending Articles



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