Working with Microsoft Word Templates in Sage CRM

The Sage CRM Blog

Articles of general interest about Sage CRM, the community, add-ons and general news!

Working with Microsoft Word Templates in Sage CRM

  • Comments 4
  • Likes

Working With Existing Microsoft Word Templates

The majority of existing Microsoft Word mail merge templates that you work with will continue to work as normal - for example, those that merge Company and Person information. However, you will not be able to edit these documents on the fly in Sage CRM. What that means is, when you kick off the mail merge process with a Word template, the template is read-only until the merge has completed.

Mail merge process using a Word template

There is an Edit Attachment option in the final step of a mail merge if you are working in Internet Explorer that allows you to edit a merged document after the merge has completed. The Allow ActiveX Document Drop (in Administration | E-mail and Documents | Documents & Reports Configuration) option must be set to Yes for this option to be available.

If you do want to be able to edit your existing Word templates on the fly in Sage CRM Cloud, you can convert them to HTML. This process is outlined in this blog: https://community.sagecrm.com/user_community/b/sage_crm_news/archive/2012/05/23/working-with-existing-word-templates-in-sage-crm-v7-1-sp2-mail-merge.aspx

Working with Quote or Order Microsoft Word Templates

To display nested items in a quote (or order) template in, a specific structure is required - If you want to include a table with nested (child) item merge fields, you need to insert start and end tags for both the main table (Quotes) and the child table (Quote Items). You must also include a TableStart and TableEnd tag in the same template section, table row or table cell. For example, if you want a row of quote item data to display, the first column in that row must include a TableStart:QuoteItems tag, and the final column must include a TableEnd:QuoteItems tag.

A basic example would be something like:

«TableStart:Orders»

«orde_createddate»
Reference: «orde_reference»

To:
«pers_firstname»«pers_lastname»
«comp_name»
«addr_address1»
«addr_address2»
«addr_address3»

Please find enclosed the updated order. Please call me with any questions you may have.

Item Name

Price

Quantity

Subtotal

«TableStart:OrderItems»
«orit_itemName»

«OrIt_quotedprice_CID»
«OrIt_quotedprice»

«OrIt_quantity»

«OrIt_quotedpricetotal_CID»
«OrIt_quotedpricetotal»
«TableEnd:OrderItems»

Total Cost:

«Orde_grossamt_CID»
«Orde_grossamt»

«TableEnd:Orders»

For more information on creating new templates in Microsoft Word and creating new quote or order templates, please refer to the following Help centre:  http://help.sagecrm.com

You can create new templates for any entity using Sage CRM's rich text editor. Any new templates you create will be saved in HTML format, and can be edited on the fly during the mail merge process. You can add images to these templates, but any images must be uploaded first. For more information on creating new templates and uploading images, please refer to the following Help centre. 

Creating a Word Label Template

You can use Microsoft Word to create a label template. When creating label templates you must:

  • Insert Sage CRM merge fields manually.
  • Wrap the template in TableStart:Labels and TableEnd:Labels tags.
  • Ensure the template contains a minimum of two label placeholders, the second of which must contain a Next field.

 To create a label template in Word:

1. Create a new blank document and insert a one row table with as many columns as you need for the labels you want to print onto, as well as the cells sized to the dimensions of the label you are using, and any required margins to align to your selected labels. 

2. Insert a TableStart:Labels tag in the top left label placeholder. To do this, select Quick Parts from the Text part of the Insert tab, then select the Field option. The Field dialog box is displayed.

3. Select the MergeField option from the Field Names drop-down in the Please Choose A Field panel.

4. Type TableStart:Labels in the Field Name field of the Field Properties panel.

5. Use the same method to insert any Sage CRM merge fields you want to include after the TableStart:Labels tag, this time typing the name of the Sage CRM merge field in the Field Name field of the Field Properties panel.

6. In each subsequent cell, insert a Next field. To do this, open the Field dialog box once more and select Next from the Field Names list. After the Next field, copy the Sage CRM merge fields from the label placeholder you created earlier. Note: You will not see the Next field unless you have the Show Field Codes Instead Of Their Values option selected in Word Advanced Options. Alternatively, you can see the field codes by pressing ALT+F9.

7. Insert a TableEnd:Labels tag after the Sage CRM merge fields you entered in the rightmost cell.

  

8. Save and upload the template. You can save it in .DOC or .DOCX format.

9. To test the merge document, navigate to a customer record.

10. In the Documents tab, select Start Mail Merge.

11. Click the hyperlink of your new template, preview the merge, and check the customer data is merged.

Comments
  • If I mail merge with a Word template then I am getting Mr && Mrs instead of Mr & Mrs. Is there away to strip off the extra &

  • How do you control the sort order of the detail lines under this new process.  When I print our a multi line quote the line item details appear random

    Gary

  • The link doesn't work for converting Word to HTML templates

  • Chris

    It should be available now.