Adding New Merge Fields

Print Friendly and PDF Follow

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.

Please note that not all fields are available by default. To customize the merge fields available for a table, see Customizing Available Merge Fields

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.

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 inputted. 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:

    Date: { MERGEFIELD TransactionDate }
  5. Add the switch to the end of the mergefield.

    Date: { MERGEFIELD TransactionDate \@MMMM dd, yyyy }
  6. Click Preview Results again to view the date field as it will now display on your printed document:

    Date: April 4, 2010
  7. Click Preview Results once more to return to the field view, and click Save to save the changes to your template.

See Microsoft Word Help for further information about formatting 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.

Questions?

If this article didn’t resolve your issue, please contact Atlas Support for assistance:

Contact Support