Was this article helpful?

Customize Invoice Templates Using Word Mail Merge

Last modified 12:59, 29 Oct 2014

Overview

This article explains how to create a custom invoice template using the Microsoft Mail Merge feature. The following topics are covered:

  1. Insert mail merge fields to a template and customize the format.
  2. Use the mail merge tables to add multiple line items to a template.

This article only discusses the mail merge features that apply to invoice templates. For more specific information about Mail Merge, refer to the Microsoft Office Word documentation. Also, if you are using a version of Word that this article does not cover, refer to the Microsoft Office Word documentation for the exact steps to work with the Mail Merge features.

Insert a Mail Merge Field in an Invoice Template

Insert a Mail Merge Field in Microsoft Word 2007 and Word 2010

To insert a mail merge field in your template in Word 2007 and 2010:

  1. In Word, navigate to Insert > Quick Parts > Field.
    InsertMergeField.png
  2. In the Field dialog box, click the Categories arrow and select Mail Merge.
  3. In the Field names field, click MergeField.
  4. In the Field Name field, enter the name of the merge field that you want to insert, e.g. Account.Name. See Supported Merge Fields for a list of available merge fields. 
    MergeFieldName.png
    The merge field is inserted in your document. For example, if you added the account name, Account.Name, in the document, the field will be displayed as: 
    «Account.Name»
  5. Click OK.
  6. Save the template file as the Word 97-2003 Document (.doc) type.

Insert a Mail Merge Field in Microsoft Word 1997 to Word 2003

To insert a mail merge field in your template in Word 1997 to Word 2003:

  1. In Word, navigate to Insert > Field.
  2. In the Field dialog box, click the Categories arrow and select Mail Merge.
  3. In the Field names field, click MergeField.
  4. In the Field name field, enter the name of the merge field that you want to insert, e.g. Account.Name. The merge field is inserted in your document. For example, if you added the account name, Account.Name, in the document, the field will be displayed as:  
    «Account.Name»
  5. Click OK.

Insert a Merge Field in Word for Mac

To  insert a mail merge field in your template in Word for Mac:

  1. In the Macintosh Word, navigate to Insert > Field.
  2. Click the Categories arrow and select Mail Merge.
  3. In the Field names field, click MergeField.
  4. In the Field codes field, enter a space after "MERGEFIELD" then type the field name you want to insert, e.g. Account.Name. For example, if you have " MERGEFIELD Account.Name" in the Field codes field, in the document, the field will be displayed as: 
    «Account.Name»
  5. Click OK.
  6. Save the file in the Word 97-2004 Document (.doc) format.

Edit a Mail Merge Field in an Invoice Template

To update a merge field using Edit Field on Windows:

  1. In your template document, right-click on the merge field you want to edit and select Edit Field.
  2. In the Field name field, enter the new merge field name.
  3. Click OK.

To update a merge field using Toggle Field Codes on Windows and Mac:

  1. In your template document, click the merge field you want to edit.
  2. Toggle the field code and result:
    • Press ShiftF9 on Windows.
    • Press option + fn + F9 on Mac.
  3. Edit the field name in the field code.
  4. Update the field:
    • Press F9 on Windows.
    • Press option + fn + F9 on Mac.
  5. Repeat the Step 2 to verify that your change has been saved.

You cannot change a merge field by simply typing a new merge field over the current field.

Generate Multiple Line Items Using Mail Merge Table

To generate multiple line items in an invoice document, use the mail merge tables.

  • To mark the beginning of a mail merge table, insert a mail merge field with the name TableStart:MyObject, where ​MyObject corresponds to the name of a multi-line object.
  • To mark the end of the mail merge table, insert another mail merge field with the name TableEnd:MyObject.
  • Between the TableStart and TableEnd marking fields, place the merge fields that correspond to the fields of your table columns. These merge fields will be populated with data from the first row of the multi-line object, then the following rows will be populated with the data from the object. 

For example, to generate multiple line items on an invoice, create TableStart:InvoiceItem and TableEnd.InvoiceItem merge fields in your template, where InvoiceItem is a multi-line object. You can create this merge field just like any other merge field, but this field specifies which region will be repeated for each of the Invoice Items.

Multi-line items can be displayed within a table and cannot be displayed in other areas of invoice templates. The following objects are multi-line items that you can use with TableStart and TableEnd merge fields.

  • InvoiceItem
  • TaxationItem
  • TaxSummary
  • Usagelines
  • UsageSummary
  • Adjustment
  • Payment

Use the sort order described Changing the Sort Order on a Table when defining products if you have specific ordering requirements.

What's Next

Next, use the advanced mail merge functionality to further customize your invoice template by defining the format for date and number fields.

Was this article helpful?
Pages that link here
Page statistics
20685 view(s) and 44 edit(s)
Social share
Share this page?

Tags

This page has no classifications.

Comments

You must to post a comment.

Attachments

 

  Zuora Global Support +1-650-779-4993 or at support@zuora.com Copyright © 2009-2014 Zuora, Inc.