Skip to main content
CCH Software User Documentation

Adding tables to a new or existing template using Queries

Product Help Banner.png

 

Users are able to either amend an existing template or create a new template to include tables where the data is to be populated from a query.

Using fields queries in a template

In order to create or amend an existing template, use the following steps:

  1. On the Find Clients screen, select a client or multiple clients.

  2. Click on Mail Merge Wizard from the Tasks tab within the ribbon.

  3. In Stage One of the wizard, select Output: Letters and click Next.

  4. In Stage Two of the wizard, select Query from the Data Source section, and select the query from the drop down list available.  

  5. Select an existing template from the grid and click Edit Template.   Alternatively if creating a new template, click Add New Template.   The Word template file opens within the ‘open application bar’.

At the top of the opened template, (regardless of whether editing an existing or creating a new template) the table names are returned that correspond with the selected query.  Using the    Client Standing Data query, four table names are returned:  Address, Associations, ExtraFields and PhoneNumbers. 

Note: Within Insert Merge Fields, all relevant query fields are prefixed with Query_TableName_ Where TableName represents the actual corresponding table name

6. Select Insert > Table and insert the required number  of columns.  Position the cursor within the first cell of the table.

7. Still within the Insert Tab, navigate to Quick Parts > Field.  
The Field window appears:

8. Select MergeField from the Field names list.

9. Under the Field Properties column, enter the following text in the Field name box: TableStart:Addresses.

10. Click OK.  (As a result, «TableStart:Addresses» appears in the first cell of the table.)

Note: In order for the merge to work, the text is required to be entered exactly as above.  Each table name must belong to one table only.

11. Position the cursor within the last cell of the table and select Quick Parts > Field from the ribbon bar. 

12. Select MergeField from the Field names list.

13. Under the Field Properties column, enter the following text in the Field name box: TableEnd:Addresses.

14. Click OK.  (As a result, «TableEnd:Addresses» appears in the last cell of the table.)

Note: In order for the merge to work, the text is required to be entered exactly as above.  Each table name must belong to one table only.

15. Once the TableStart/TableEnd details have been inserted, the query fields belonging to the same table name are required to be added (Found under the Mailings Tab).

16. Add the first field into the first column after <<TableStart:Addresses>>

17. The last field that the user wants to add, should be added in the last cell of the table before <<TableEnd:Addresses>>

Note: Please ensure when selecting the fields to be added that the field is prefixed with Query_TableName_.

18. Column headers can be added to the row above that containing the query fields. To add additional tables using the other table names repeat steps 4 though to 10.

19. Save the template and close MS Word.

Note: CCH suggests that the font is changed to the background colour so that the table names are not printed out when running the mail merge.  Alternatively, the table names can be deleted after table creation

Running mail merge after amending template

After closing the word template, re-select the template and click next to continue with the mail merge as normal.

Note: The query is now associated with the template and is therefore returned within the query column alongside the template name.

Running a mail merge for existing associated template

To run a mail merge using an existing template already associated with a query, select the relevant template, then select the query option from Stage one and the applicable query.  Click 'Next' and continue with the mail merge as normal.

 

  • Was this article helpful?