Hi All,
I need to pull out the following marginal tags in XML jobs.
I hope problem is in coding 18th line.
Screenshot:
Image may be NSFW.
Clik here to view.
Coding is below:
var myDoc = app.activeDocument; var myLib = app.libraries[0]; var myXMLElement = app.activeDocument.xmlElements[0].evaluateXPathExpression("//marginalnote"); alert(myXMLElement.length); for(i=myXMLElement.length-1; i>0; i--) { var myText = myXMLElement[i].texts[0]; alert(myText.contents) var myLibraryAsset = app.libraries[0].assets.item("box").placeAsset(myXMLElement[i].insertionPoints[-1])[0]; var myTextMove = myXMLElement[i].texts[0].move(LocationOptions.AT_END, myLibraryAsset.insertionPoints[0]) //Problem in this only myLibraryAsset.appliedObjectStyle = myDoc.objectStyles.item("Box") myLibraryAsset.fit(FitOptions.frameToContent) }
Thanks in advance
Siraj