Open a document, open a data source, update furniture, close data source, save document to a new name.
To install this script, navigate to the Adobe InDesign Application Directory and paste the script file into the following folder ‘Scripts -> Scripts Panel’. The script can then be run from the Scripts panel; this is found in ‘Window -> Utilities -> Scripts’.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | var fileToOpen = "ENTER PATH TO THE DOCUMENT TO OPEN"; var fileToSave = "ENTER PATH TO THE SAVE DOCUMENT"; var datasourceName = "ENTER THE NAME OF THE DATA SOURCE HERE"; var myDoc = app.open(fileToOpen); var myEasyCatalog = app.easycatalogObject; var myDS = app.easycatalogObject.datasources.item(datasourceName); var myDV = myDS.dataviews.add(); $.writeln(myDV.records.count()); myEasyCatalog.updateFurniture(myDoc); myDV.closeDataView() myDoc = myDoc.save(fileToSave); myDoc.close(); |