-
1. Re: Scripting a file name change as a data merge element.
Kasyan Servetsky Apr 8, 2009 8:48 AM (in response to TeamworkEr)Hi Matt,
I think it’s better to use an XML-based approach for your task.
I’ve never scripted Data Merge process, but I don’t see a straightforward way of doing it. May be you can create the 3rd textbox on pasteboard or a non-printing layer, which will contain the file path from ‘ResultingFileName’ field, and the contents from which can be used for naming & saving the current file and exporting it to pdf-file. But this approach is so clumsy.
Instead, you’d better to keep your data in excel file, or even better Access or some other database program.
Export the data from it in XML-format.
Then import it to an InDesign file and process it by script. XML support is very powerful in InDesign: you can process your data by xml-rules. I once made a script for a newspaper, which processed data for classified ads. The script applied all formatting, changed colors for different headings and placed images.
Kasyan

