Hi,
I hope you need place the marginal note has an anchored object? If yes, you can use the below JS code.
If you post any requirements in the forum please post what you have tried in you end in Java script. Then only some one help to easily. Otherwise is so difficults. Your most of the post always simply shown the snapshots only please place the JS code in your future post.
var mydoc = app.activeDocument;
var rootElement = mydoc.xmlElements.item(0);
var linkElementList = rootElement.evaluateXPathExpression("//marginalnote[@type='mn1']");
for(var lp=0; lp=linkElementList.length; lp++){
var myElement = linkElementList[lp];
var myTextframe = myElement.placeIntoInlineFrame(["21p9","5p"]);
//you have create the object style in you document name is "MN";
myTextframe.appliedObjectStyle= mydoc.objectStyles.item("MN");
}
alert("Proces Completed");
thx
csm_phil
Hi sir,
Please accept my sincere apology for this and I will make sure this will not happen again. I need your help once again, sir we want, marginal note place in simple text frame with apply “MN” object style in place miner column. When we have run script code show err. We have alredy creat “MN” Object style in .indd files.
Thanks !!!
Hi Sneig,
I have modifed the above JS code. Please try this.
If your document have only one marginal note then the script will through the error. So I have changed the reverse loop thats all.
var mydoc = app.activeDocument;
var rootElement = mydoc.xmlElements.item(0);
var linkElementList = rootElement.evaluateXPathExpression("//marginalnote[@type='mn1']");
for(var lp=linkElementList.length-1; lp>=0; lp--){
var myElement = linkElementList[lp];
var myTextframe = myElement.placeIntoInlineFrame(["21p9","5p"]);
//you have create the object style in you active document the object style name is "MN";
myTextframe.appliedObjectStyle= mydoc.objectStyles.item("MN");
}
alert("Proces Completed");
thx
csm_phil
North America
Europe, Middle East and Africa
Asia Pacific