So I wrote a program (C#) a few years ago that basically opens an InDesign Exchange file, does a find/replace based on a SQL table datasourse and then our graphics folks would just convert the completed INX file back to InDesign and ultimately to a PDF. Too many steps.
There are upwards of 2500 pieces of variable data in each file, so a product like DesignMerge is not practical. Our data file basically consists of 2 fields [LookFor] and [ReplaceWith], I'd like an Indesign script that will just run through the data file and do a Find/Change for each record. Is this doable and does anyone have any suggestions or starting points?
Thanks!
Yes, it's possible. In my oppinion the easiest approach is to export your data to a csv-file and read it by script. I posted an example in this thread.
However, on PC, it's also possible to exchange data directly between InDesign and Excel, or Access (without csv). I did some tests: the main (InDesign) part was written in JS. Another (Excel) part that opens a workbook, reads records and closes it was written in VB (it is sent from the main part via doScript method). The VB script reads all used ranges puts, them into a string and returns it back to the JS via ScriptArgs.SetValue method (JS gets the string by app.scriptArgs.getValue method).
North America
Europe, Middle East and Africa
Asia Pacific