Using Access with Word Mail-Merge
At the time this page was written, MS Access had no built-in components to apply the formula needed to format the static data appropriately. This conversion must be done either before the data is put into the table, or by using one of IDAutomation’s VBA functions when the data is ready to display in an Access form or report. In Excel, however, the data is formatted correctly into another column using the macros and can then be pulled into the mail merge.
There are three options:
- Print directly from Access by creating an Access Report, or use the built-in templates for creating documents & labels as desired. This may be the least flexible approach. IDAutomation has outlined several methods here.
- Create a simple program, using Visual Basic or the programming language of your choice, which would convert the data into the correct format before the data is put into the table. The program would insert the actual data into one column in the table and put the converted data in another column. Once the data is in the table, a mail merge can be accomplished in Word by linking to the formatted data column and applying the barcode font to the mail merged field.
- Export the Access table to an Excel spreadsheet, because Excel allows for the application of special formulas to the data in the columns. Using Excel requires exporting the data from Access into Excel. The Export wizard will be found in the File menu in Access. Once the data is in Excel, add an additional column to the spreadsheet and follow the tutorial for using custom formulas. Now that the data is formatted properly in Excel, use IDAutomation’s Mail Merge Tutorial for finishing the task.