tags:

views:

354

answers:

0

I am developing a database application where users open a Word template document and merge this with database records. I have successfully written code that does this for one record where I open a template file and replace items in the template document with DB data. I have tried opening the template document multiple times (once for each DB record), but this opens a Word dialogue box prompting the user to open the second and subsequent documents as read only (not very elegant) and I get a Word Normal.dotm error when each of the documents is closed. So, how can I use one template document to create multiple word documents at the same time. Two options as I see them are to 1) Save one doc in a new name before creating other documents or 2) Have one document with multiple pages (one per DB record) but to do this I would have to copy and paste the template document contents once for every record, but I don't see how to do this. Please keep in mind that I am experienced in database programming and only a rudimentary knowledge of VB for applications, so the more explicit you can be, the more useful it will be.

Thanks in advance.