Hi Jump_Over,
Extremely Sorry for the late response....
Above coding working fine to cut and move the "tx" style in Marginal Notes("aaa").
But facing the new problem is,
If we apply the object style to the Marginal box, fill color properties is lost.
Could you have any solution for this.
var myDoc = app.activeDocument;
var myLib = app.libraries[0];
app.findTextPreferences = app.changeTextPreferences = null;
app.findTextPreferences.appliedParagraphStyle = "tx"
var myFound = myDoc.findText()for(k=myFound.length-1; k>-1; k--){ var myAnno = myFound[k].texts[0] var myPlaceAsset = myLib.assets.item("aaa").placeAsset(myFound[k].insertionPoints[-1])[0]; var mRef = myPlaceAsset; mRef = mRef.textFrames[0]; myAnno.move(LocationOptions.AT_END, mRef); myPlaceAsset.appliedObjectStyle = myDoc.objectStyles.item("bbb") }
Please find the screenshot:
Thanks in advance
Beginner_X