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

Placing library item into page

$
0
0

This script for placing library item into page and applying object style to the item. In line 16, script shows that "assets" property does not support. Please resolve this.

if (app.documents.length==0){    alert("Please open the Document");    exit();    }
if (app.libraries.length==0){    alert("Please open the Library");    exit();    }
app.findTextPreferences=app.changeTextPreferences=null;
app.findTextPreferences.appliedParagraphStyle="MN";
var myfound=app.activeDocument.findText();
alert(myfound.length);

for(i=0; i<myfound.length; i++){   
var mylib=app.libraries.assets.itemByName("Box").placeAsset(myfound[i].insertionPoints[0]);
var mymove=myfound[i].move(LocationOptions.atBeginning, mylib.insertionPoints[0])
mylib.appliedObjectStyle="MN_Obj";
}

Viewing all articles
Browse latest Browse all 15932

Trending Articles



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