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.
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:
- First, find the date field that you want to reformat, for example, <<TransactionDate>>.
- 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.
- After locating and viewing the field you want to edit, click the Preview Results button again to return to the field view.
-
Right-click the field you want to edit and select Toggle Field Codes from the edit menu. The Mergefield data appears:
Date: { MERGEFIELD TransactionDate }
-
Add the switch to the end of the mergefield.
Date: { MERGEFIELD TransactionDate \@MMMM dd, yyyy }
-
Click Preview Results again to view the date field as it will now display on your printed document:
Date: April 4, 2010
- 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:
- http://office.microsoft.com/en-us/word-help/insert-and-format-field-codes-in-word-2010-HA101830917.aspx MS Word 2010
- http://office.microsoft.com/en-us/word-help/insert-and-format-field-codes-in-word-2007-HA010338798.aspx?CTT=5&origin=HA010100426#BM9
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.