I am trying to implement a solution where we can automate the data merge process offered by InDesign (see here: Merge data to create form letters, envelopes, or mailing labels in Adobe InDesign ). I am currently using the COM interop classes from the SDK to achieve this, but I having trouble actually instantiating the classes required to actually execute the data merge.
I have an existing CSV file I will be using to conduct the import, and I have an existing InDesign file that can accept the mapping.
Here's what I have so far in terms of process:
Basically, what is not clear in their SDK is the following:
Also, we are planning to use similar logic on the InDesign server. Will the same process from above be valid on InDesign server?
I agree with Rob, this is probably better answered in the InDesign Scripting forum, if one of the Mods could move this topic, that'd be grand.
var myDoc = app.activeDocument;
var myExport = File(app.activeDocument.filePath + "/" + app.activeDocument.name.split(".indd") + ".pdf");
recordSelection = RecordSelection.ALL_RECORDS;
app.dataMergeOptions.removeBlankLines = true;
myDoc.dataMergeProperties.exportFile(myExport, "[High Quality Print]", );