This content has been marked as final. Show 6 replies
You have to go through a bit of a song and dance. First, you must make sure there's no text selection active at the time, then you must move the item from wherever it lands to where you want it.
So, something like this:
var myObj = theAsset.placeAsset(myDoc);
and then you can move it to the right place on the page (you might even have to move it to the right page first -- although you can probably control that by setting the activePage first:
app.activeWindow.activePage = myPage;
What is theAsset?
It's a reference to the asset you want to place.
I lifted that line from this page:
That's the result of a search of my blog using "placeAsset".
My code is
var myObj = app.libraries.assets.placeAsset(app.documents);
and now it places some element in some place. How can I determine the element by name instead of number (assets)?
myAsset = myLibrary.assets.item("AssetName");
Thank you, Dave!