Resolving Problems with Mail Merges


If mail merge documents are not printing with Patient/Client data correctly inserted, or for general instructions on how to create new mail merge documents, refer to this article.

Underlying challenge

Capable 21C relies on a Microsoft Access database to store all patient/client data. It leverages Microsoft Office functionality to produce mail merge documents that permit all the richness and quality of Microsoft Word. However, to have the combination of the three products integrate patient/client data into documents requires a sequence of steps that involves skills in the use of Microsoft Word, Microsoft Access and an understanding of how Capable 21C stores patient/client data.

The Capable 21C product ships with several Microsoft Word documents already prepared with the appropriate integration. To provide the optimal compatibility for its clients, Capable Software ships these components in very early versions of Microsoft Word and Microsoft Access.


There are three core components to Microsoft Word mail merges.

  • The Microsoft Word Document itself.
  • The underlying Microsoft Access database.
  • The configuration of Capable 21C to enable easy access to the Microsoft Word Documents

The following detailed instructions explain each of these components, and how an office can exploit the integration to improve its business processes. Note that the preparation of mail merge documents, testing and tuning them is a time consuming exercise. Allow plenty of time before attempting the steps described in this article.

At times, it will be necessary to close Capable 21C, and much of the work will be done using Microsoft Word. Microsoft Word and Microsoft Access must be installed on the PC for the steps in this article to be completed.

A moderate level of skill in using Microsoft Word is assumed. Microsoft publishes a significant amount of training information, on line help and documentation to assist users in the use of mail merge functionality. Users who are new to mail merges are advised to peruse Microsoft’s literature before proceeding.

Detailed Information

To create or edit a Microsoft Word Mail merge document, follow these instructions:

  • Start Microsoft Word.
  • Create a new document or open an existing Mail merge document (the generic documents shipped with Capable 21C are located in the C:\Capable\Letters folder).
  • Modify the existing layout or create the content for the document using the full functionality of Microsoft Word.
  • Select the option in the Tools menu for the Mail merge helper. This feature is located in slightly different menus for different versions of Microsoft Word.
  • Use the Mail merge helper to ensure that the Word Document is appropriately linked to the underlying database (refer to detailed instructions below).
  • Save the document back to the C:\Capable\Letters folder.

To link a mail merge document to the underlying Capable 21C database, follow these steps:

  • When Capable 21C is shipped, no patients/clients are selected for mail merging, so the default query ‘Mail Merge Data’ will not have any patient names or addresses available. From within Capable 21C, a patient should be selected before proceeding. This can be done by going into Patient Details within Capable 21C and by clicking the One Off Letter button. Selecting any document from the fly out menu will select that particular patient for mail merging, and will prepare the mail merge query for the following steps. Once the document is selected from the fly out menu, Capable 21C will attempt to open one of the generic Word Documents in Microsoft Word, and may attempt to print that document. If it leaves the document open in Microsoft Word, close it before proceeding to the next step.
  • The Capable 21C database is shipped in Microsoft Access 95 format. This ensures that all versions of Microsoft Access are able to open and manipulate the database. However, it also means that users of later versions of Access will be prompted to convert or open the database when it is first opened, or if it is used for a mail merge. This feature of Microsoft Access will disrupt mail merges, and can be prevented by converting the database to the installed version of Microsoft Access. To do this, follow these steps:
  • Ensure that Capable 21C is closed on all PCs in the network.
  • Open Microsoft Access.
  • Open the database (by default, it is located in C:\Capable and is called Capable.MDB).
  • If the database is in an older version of Microsoft Access format, a number of warning messages will appear indicating that database changes may not be made.
  • From the Tools menu, select Database Utilities and Convert Database. Different versions of Microsoft Access will offer different options in this menu, but all will offer an option to convert the database to the current version.
  • Some versions of Microsoft Access will prompt for a new name for the converted database. Some versions of Microsoft Access will not. If Microsoft Access prompts for a new name for the database, save the new (converted) database as Capable2.MDB in the same folder as the original.
  • The conversion will typically take between 1 and 10 minutes. When it is complete, close Microsoft Access.
  • If the installed version of Microsoft Access prompted for a new filename (eg step e), open the Windows Explorer, locate the C:\Capable folder, rename the original Capable.MDB to OldCapable.MDB, and then rename the newly created (converted) Capable2.MDB to Capable.MDB.
  • Take a moment to restart Capable 21C to ensure that it still operates correctly. If Capable 21C will not start, review step h to ensure that the converted database was correctly renamed to Capable.MDB.
  • From the Microsoft Word Mail merge Helper, click the ‘Open Datasource’ button, or browse for a list of recipients.
  • Browse for the Capable.MDB in the C:\Capable folder. On some versions of Microsoft Word, it will be necessary to change the ‘File Type’ being searched to ‘Microsoft Access Database’ before the Capable.MDB file will become selectable.
  • Some versions of Microsoft Word will immediately offer the queries within the Capable 21C database as data sources for the mail merge. Others may require the user to switch to the ‘Queries’ tab before they will be visible. Older versions of Microsoft Word may require an Options button to be clicked to enable ‘Views’ to be displayed. Once the queries are visible, you can choose the query you require for this particular mail merge. The queries that are are:
  • ‘Mail Merge Data’ – this query should be used for doing any one-off letter directly from Capable 21C in the Patient Details window.
  • ‘Use This Query for Microsoft Word Merges’ – this query should be used when you want to do a mail merge to your entire database.
  • “Use this query for people not in recently’ – this query should be used when you want to do a mail merge to people who have not had an appointment in the last XXXXXX.
  • Different versions of Microsoft Word offer different techniques to include mail merge information into the Word Document. A list of fields such as Surname, First Name and Address will be available for inclusion in the document. Generic documents that are shipped with Capable 21C already have these fields inserted and make a good template/example for the creation of new documents.
  • Once the fields have been inserted, most versions of Microsoft Word will allow for the document to be tested by clicking the <> button on the Microsoft Word button bar.
  • The Word Document can now be saved. It should be saved into the C:\Capable\Letters folder (though this is not mandatory). Note that if the only change to the Word Document was steps 3-5, there is a defect in Microsoft Word that will prevent it from saving the changes correctly. If this is the case, make a minor change to the document to ensure that Microsoft Word saves it correctly.

To integrate a new mail merge document with Capable 21C:

  • Capable ships with a few generic Word Documents that are already prepared for mail merges. These documents should be located in the C:\Capable\Letters folder.
  • Additional documents created by the user can be located in the same folder, but may be located anywhere on the network. Note that if the documents are to be printed by networked PCs, they must be located in a folder that is shared on the network.
  • From within Capable 21C, go to Setup|Setup Document Types.
  • Setup Document Types will only allow for the integration of documents other than the generic documents shipped with Capable 21C. Those generic documents are already integrated, and as long as their names have not been changed, Capable 21C will be able to activate them normally.
  • Add a new document type, and set the appropriate values for the newly created document. Use the ‘…’ button to help locate the file if its exact location is not known. Tick the ‘keep permanent’ checkbox if the office would like to keep a permanent copy of every instance of this document that is produced.
  • Once the new document setup properties are saved, the document will be accessible from within Patient Details by clicking the one-off letter.

Important items to note:

  • The generic documents shipped with Capable 21C are: Absentee.doc, Birthday.doc, BringUp.Doc, Clash.doc, ClosFile.doc, INSURE.DOC, Missed.doc, Recall.doc, Referral.DOC, Reminder.doc Of these documents, the BringUp, Recall, File Closure and Referral documents can be automatically spawned from within Patient Details. Whenever any of these are requested from within Patient Details, they will automatically Open, Print and then Close.
  • Any other document spawned from within Patient Details will Open and remain open without printing. It is up to the user to select the Print button from within Microsoft Word.
  • If documents are printing without the correct patient details, the following items should be checked:
  • Ensure that the document is actually a Microsoft Word mail merge document. Early versions of Microsoft Word convert mail merge documents back to normal documents if they are opened before patients/clients are selected from within Capable 21C. This can be checked by opening the document using Microsoft Word, and by checking to see if the mail merge button bar is visible or not. If it is not, the document should be converted into a Microsoft Word mail merge document using the steps described earlier in this article.
  • Ensure that the document links to the correct query. This can be done from within Microsoft Word by opening the mail merge helper and examining the selected data source. Whilst mail merge documents can use several different queries to retrieve data from Capable 21C, the Mail Merge Data query is recommended as the easiest and most reliable. See below for a list of available queries.
  • Ensure that the document links to the correct Capable 21C database. In a network environment, the Capable 21C database may be located on a server, or another PC. It is important to ensure that each mail merge document links to the correct database. If the same documents are shared by all PCs in the network, it is important to check that they open correctly on each PC.

Queries available within the Capable 21C database:

Whilst most mail merges will link to the Mail Merge Data query, there are other queries available within the Capable 21C database. Additional queries may be developed or obtained via a Ghost database (refer to the KBA on Mail Merges with Ghost database).

Query Name


Family Address Mail Merge

Lists all non-deceased patient files but groups them as families, and includes a special field that shows the family name appropriately (eg Mr & Mrs Smith or The Smith Family).

Mail Merge Data

Shows name and address details for the most recent patient selected for a One Off Letter via Patient Details or for Custom Tracking Queries.

Mail Merge Data With Balances

As above, but also includes the patient balance

Mail Merge Insurers

As above, but shows the insurer and insurance address instead

Mail Merge Referees

This query will display the Referee Name and Address, the number of patients referred and the name of the most recent referral. The referee selected is the most recent patient selected for a One Off Letter via Patient Details.

Use this query for people not in recently

This query will display all patients who have been in within the last 6 months, but not in the last three months.

Use this query for Microsoft Word Merges

This query shows basic name and address details for every patient on file.

Technical Notes:

  • Capable 21C uses an .INI file in the same folder that the application is installed to locate the generic Word Documents. By default, it locates documents in the C:\Capable\Letters folder. If the office desires for all machines in a network to share the same documents, the .INI file should be updated to reflect the central location of all documents.
  • Note that Capable 21C can support UNC filenames in the .INI files, and in the internal settings that define the locations of documents. The use of UNC filenames is preferred, as some versions of Microsoft Windows tend to lose drive mappings if networked machines are started before the server machine is running.
  • Note that on some versions of Microsoft Windows, UNC filenames will not work if the target share is located on the same machine. It is recommended that care is taken in the configuration of document location and database links.
  • Documents may be linked to the Capable 21C database using ODBC connections instead of JET ISAM connections. This typically results in faster document opening and print times, but is much more complex to configure.
  • Upgrades to Capable 21C often result in changes to the queries defined the Capable.MDB database. It is not recommended that the standard queries are changed. If specific/custom queries are required, it is recommended that another database is created with table links to the original database, and the custom queries are created in that new database. Capable 21C forcibly re-establishes links to the core Capable.MDB database for the generic documents shipped with the product, so this option will only be useful for ‘Setup Document Types’ defined documents.
Also refer to KB-Mail Merges 2007 and KB-Microsoft Office 2007

This knowledge resource is designed for use on a Windows (tm) XP system operating at a screen resolution of 1024x768 or better. Windows Media Player must be installed for this training resource to operate correctly.

Copyright 2008 Capable Software Pty Ltd

Training Sessions

Fundamentals Training Modules

Intermediate Training Modules

Advanced Training Modules

Other Resources

Return to Capable Software home

Contact Technical Support