Code to be evaluated! [009] Cross-Reference Format! …
Hi all Scripters,
I've an exasperating issue with the cross-reference format definition in [JS]!
With this code:
var myDoc = app.activeDocument;
var myCRFormat = myDoc.crossReferenceFormats.add ('myTest');
var myCRCharStyle = myDoc.characterStyles.itemByName("Superscript");
myCRFormat.appliedCharacterStyle = myCRCharStyle;
myCRFormat.buildingBlocks.add ({blockType: BuildingBlockTypes.CUSTOM_STRING_BUILDING_BLOCK, customText: '<txtAnchrName/>'});
I get this:

Grrr!!! ![]()
Moreover, I find this code not frankly cool to read! Could we add "myCRFormat" directly playing with properties?
Thanks in advance for your comments!
(^/) ![]()