Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hi all!
What I've got is a word document with all of the mail merge fields created and ready to drop data in from a database file (put data ID # here, address there, name over here, check off this checkbox if the next column is a 1 or a 0, another checkbox, ...). The database file name changes frequently, so it's not a fixed name and it'll need to be browsed for each time. The template file, however, will be in a static location and will not change.
What I'm looking to do is:
1) Open the template document [with its layout and merge fields] and copy it
2) Browse for the data (xls) file and sheet. [Note: The file name will change, but the tab name and formatting (order) of the fields will not change]
3) "Propogate" [Word's terminology] the layout/fields into an existing document, adding X number of pages for X number of records in the database
4) Close template document
What I'm envisioning is a macro, say "InsertDataIntoTemplate", that I can run in Word. Whenever I come to the section of the report that needs this pre-formatted layout (.dot file) and its data (.xls file), it'll do the same basic thing as going through the mail merge wizard [Open data file, import data from XYZ tab, then fill in the data].A copy of a simple document template and excel database are uploaded at: http://www.24hourgames.com/mailmerge/
Directory is unprotected for viewing.
data.xls is a simple database showing the types of fields (names, addresses, whether it has a ____ or not [a 1 or a 0], etc.)
datadocumenttemplate.doc is the simplified layout.Thanks,
Hoop

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |