Skip to main content
Participant
April 2, 2009
Question

Edit script to be usable in CS3 (place Specific Asset on Page)

  • April 2, 2009
  • 2 replies
  • 342 views
Can someone help me edit this script to be usable in InDesign CS3

myLib = app.libraries.item("Library.indl");
myFounds = app.activeDocument.search("[SampleLibrary Asset]");
for (j = myFounds.length - 1; j >= 0; j--) {
app.select(myFounds);
myLib.assets.item("[SampleLibrary Asset]").placeAsset(app.activeDocument);
}

This use to work in InDesign CS2 but it not working in C2.
I tried placing the script to /Applications/Adobe InDesign CS3/Scripts/Scripts Panel/Version 4.0 Scripts /. But it did not help.

Thanks in advance.
This topic has been closed for replies.

2 replies

Participant
April 2, 2009
This did the trick.
Thanks again.
Kasyan Servetsky
Legend
April 2, 2009
var myDoc = app.activeDocument;

myLib = app.libraries.item("Library.indl");
app.findTextPreferences = app.changeTextPreferences = null;
app.findTextPreferences.findWhat = "[SampleLibrary Asset]";
myFounds = myDoc.findText();
for (j = myFounds.length - 1; j >= 0; j--) {
app.select(myFounds);
myLib.assets.item("[SampleLibrary Asset]").placeAsset(myDoc);
}
app.findTextPreferences = app.changeTextPreferences = null;