I think to easiest option for me would be to use the ODBC connection. Now my problem is where to start with the VBA code; but that's for another list. cheers
This is a mod_perl module used in the HeaderParser phase of the Apache request cycle; it first grabs the sql associated with the model, and passes parameters to it; this sql is used to retrieve the required values for the model, and the placeholders in the document are replaced with those values. The user is then redirected to the newly created document
You can see it in action in the demo account of the site referenced in my signature : open any file (those are legal files/insurance claims), click on the 'Contributors' tab (third tab from left; add a contributor if none is present), and click on 'Templates'. Click on the template to generate a document
We used it to replace some homegrown code similar to what Vincent described that directly manipulated the document. There are enough idiosyncracies among the file formats that I've been much happier using the TBS code. I think this is especially true if you are merging multiple records into a single, repeating template document as opposed to doing a single set of replacements.