Adding New Merge Fields

ILLiad exports certain tables to the .xls files for Microsoft Word to read into the templates. Usually those tables include:

  • Transactions: Data related to specific requests
  • Users: Data related to patrons using ILLiad
  • LenderAddresses: Data related to other libraries, both borrowing and lending
  • LocalInfo

You can add any ILLiad field related to the current record by clicking the Insert Merge Field drop-down box on the Mailings tab of the Word template. Clicking a field name on the list will add the record to the mail merge document and show a merge tag within the template. Editing is easier if the MERGEFIELD coding is not visible. To toggle the codes off and on, use Alt F9.

Viewing Word Merge Fields for Templates

The word merge fields for a specific print template are visible in the PrintQueue worksheet of that template's .xls file. For example, to view the merge fields available in the PrintRequest.doc Word template, look in the PrintQueue of the PrintRequest.xls file. Note that if the xls file does not exist, you will have to print the document once to generate the .xls file in order to view the PrintQueue worksheet.

Icon

The LegacyQueue worksheet exists in the .xls files so that Word templates created for ILLiad 7.4 and prior will still work without changing merge field names. We suggest using the PrintQueue worksheet for any new Word templates you create as they have more complete and clear field names, e.g., Transactions.TransactionNumber versus TRANSACTIO.

Formatting MergeField Information

The formatting of MergeField information in a word document happens in the document's field codes for the field that is being input. You can format the commands manually by typing in your changes or using the Edit Field command.

Editing the Date Format in a Mergefield

You can easily edit the date formats of mergefields such as TransactionDate and ItemDate using date/time format switches. This allows you to change a date field from the default format of MM/dd/yyyy (4/4/2010) to, for example,  MMMM dd, yyyy (April 4, 2010). To change the date format in a mergefield, open the Word template and follow the directions below:

  1. First, find the date field that you want to reformat, for example, <<TransactionDate>>.
  2. To view the field as it will appear when printed, open the Mailings tab and click the Preview Results button. The default <<TransactionDate>> field appears in the format 4/4/2010.
  3. After locating and viewing the field you want to edit, click the Preview Results button again to return to the field view. 
  4. Right-click the field you want to edit and select Toggle Field Codes from the edit menu. The Mergefield data appears:

  5. Add the desired switch to the end of the mergefield.

  6. Click Preview Results again to view the date field as it will now display on your printed document:

  7. Click Preview Results once more to return to the field view, and click Save to save the changes to your template.
Icon

View the short video tutorial, Changing the Format of a Date Field on a Print Template, for visual instructions outlining the steps above. See Microsoft Word Help for further information about format switches:

You can also use the Edit Field command to open an edit box and type your switch there if you prefer. You would need to click the Field Codes button to view the mergefield data in the edit box. Clicking the Options button allows you to add other general and field specific switches directly to the mergefield.

Using the Edit Field Command

Right-clicking on a merge field and clicking the Edit Field command provides you with many options for formation mergefield information. For example you can print a patron's last name in all caps by using the Uppercase command.