Issue
I have set up a Word Template or Stationery with Merge Fields to bring in client or user information, but it is not bringing in the information, or it is bringing in incorrect information.
Causes
This could be caused by one of the following.
- The Merge Field may not have been added correctly, or an incorrect field has been added to the Template or Stationery.
- Merge Fields need to be added using the desktop version of Word as the functionality is not available in the Online version of Word. If you have copied in Merge Fields when editing or creating the Template or Stationery using the online version of Word, they will show as the field itself and will not bring in the information that relates the Merge Field only.
- Merge Fields can be edited in the same way as text in the Template Editor so you may have accidentally changed something in the Merge Field.
Solution
Review the Document and Merge Fields
Check the following:
- Check that you used the desktop version of Word when editing the Template or Stationery or, if you have prepared the Word document and used drag and drop or Upload to import it, check that you added the Merge Fields to the document using the desktop version of Word.
- Check that the Merge Field has two angle brackets for the opening and closing brackets. You cannot type these as simple characters on the keyboard (they are not the characters < and >). These brackets must be included by adding the Merge Field in Word or by copying the code from the FYI Merge Fields.docx. Refer to Including Merge Fields in Word Templates and Stationery to download the document.
- Make sure there is not a space after the opening angle brackets and before the closing angle brackets.
- Make sure there are no spaces in the Merge Field name itself.
- Make sure the brackets are on the same line (so there are no line breaks in the Merge Fields).
- Add the Merge Field again in case the name of the Merge Field has been accidentally changed.
You cannot edit the Merge Field in Word by typing the text directly. You need to right-click over the code and using the Word functionality such as Update Field and Edit Field. - Check that you are including the correct field.
Refer below to Merge Fields not pulling in the correct details and refer to the additional information about the Merge Fields in the document FYI Merge Fields.docx which you can download from the Template articles. Refer to Including Merge Fields in Word Templates and Stationery. - If you have applied any formatting to the text, this may have been added incorrectly. Try adding the Merge Field without any formatting and check the result, then apply any formatting once you know the Merge Field is working correctly.
- If you are having an issue with headers and/or footers when both a Template and Stationery are being used, check that headers/footers are only used in one of these, not both as this can cause the Stationery to not work as expected.
- If you are not seeing the correct value for the Merge Field ‘Contact Name', and your practice is integrated with Xero Practice Manager or using FYI as the Practice Management source, note that this uses the name of the primary contact in XPM. Check Xero Practice Manager to ensure a Primary Contact has been selected for the client.
Merge Fields not pulling in the correct details
If the correct value is not being pulled in for a Merge Field, check the actual value in the Word Template or Stationery. In Word, it is possible to change the text of the Merge Field without changing the field itself.
- Edit the Word Template or Stationery using the desktop version of Word.
- Right-click on the Merge Field in question.
- From the Word pop-up menu, select Toggle Field Codes.
For example, if you have Merge Field «OwnerName» this should show as follows:
{MERGEFIELD OwnerName }
or as
{MERGEFIELD OwnerName \* MERGEFORMAT}
When you toggle the Word Field Code, if it shows a different Merge Field, this is the value that will be pulled in.
For example, if «OwnerName» is showing as {MERGEFIELD Manager \* MERGEFORMAT} it will pull in the Manager name, not the Owner.
- To correct a field, right-click over it in Word and select Edit Field, then enter the correct name (refer to the document FYI Merge Fields.docx that can be downloaded from Including Merge Fields in Word Templates and Stationery.