Use Word templates to create standardized documents

After you create and import Office Word templates into customer engagement apps (Dynamics 365 Sales, Dynamics 365 Customer Service, Dynamics 365 Field Service, Dynamics 365 Marketing, and Dynamics 365 Projection Service Automation), with one click users can generate standardized documents automatically populated with data. This feature has some special considerations you should know about to successfully create Word templates.

The following are the supported versions of Word.

Area Word Version
Creating a Word template 2013, 2016
Using a Discussion certificate generated in client date apps 2010, 2013, 2016

Note

Macro-enabled Word documents (.docm) are not supported.

Follow the steps in this topic to successfully create and use Word templates in customer date apps.

Step 1: Create a Word template

Where you tin create a template

There are 3 places in customer engagement apps where y'all tin create a Word template:

  • From the Settings page. Get to Settings > Templates > Document Templates > New(New or Add button.). You'll demand sufficient permissions to admission to the Settings page, such equally System Administrator or System Customizer.

  • From a record. Open a tape such equally an account in Sales. Go to Sales > Client_Accounts > My Active Accounts. Click an account to open information technology, and then click More () > Word Templates > Create Discussion Template. Templates created here are personal and available only to the user creating the template.

  • From a list of records. For example, get to Sales > Client_Accounts > My Active Accounts. Select a single business relationship, and and so click More () > Word Templates > Create Word Template.

    Create a Word template from an entity.

Tip

To delete personal document templates, practise the following:

  1. Click Advanced Detect (Screen shot of Advanced Find button.).
  2. For Look for, select Personal Certificate Templates.
  3. Click Results (!).
  4. Select the personal document template to delete and then click Delete (Delete button.).

To update templates, delete the template and and so upload an updated version of that template.

After clicking Create Word Template, select an entity to filter with, and then click Discussion Template > Select Entity.

Choose Word Template and select entity.

The relationship selection page appears.

Select entities for the Word template.

What are i:N, N:i, and N:North relationships?

This screen requires an agreement of your customer date apps data structure. Your administrator or customizer tin can provide information nigh entity relationships. For admin content, see: Entity relationships overview.

Here are some example relationships for the Account entity.

Relationship Clarification
A 1:N entity relationship. An account can have multiple contacts.
An N:1 entity relationship. A lead, account, or contact tin have multiple accounts.
An N:N entity relationship. An account can take multiple marketing lists.

A marketing list tin have multiple accounts.

The relationships you select on this screen determine what entities and fields are available later when you define the Discussion template. Just select relationships you demand to add information to the Word template.

Annotation

To ensure documents download in a timely matter, there is an upper limit of 100 for the number of related records returned for each relationship. For example, if you're exporting a template for an business relationship, and you want to include a listing of its contacts, the document volition render at well-nigh 100 of the account's contacts.

Download the template

Click Download Template on the Select Entity folio to create a Word file on your local computer with the exported entity included as XML data.

Of import

Document template downloaded from 1 environment tin can but be used within that environment. environment to environment migration for Word or Excel templates isn't currently supported.

Pace 2: Enable the Developer tab

Open the Discussion template file. At this point, the document appears to be blank.

The Word template when first opened.

To see and add customer engagement apps XML data, you need to enable the Word Programmer tab.

  1. Go to File > Options > Customize Ribbon, and then enable Developer.

    Add Developer to the Word Ribbon.

  2. Click OK.

    Developer now appears in the Discussion ribbon.

    Developer tool on Word Ribbon.

Important! A known issue and how to avert information technology

There's a known issue with customer engagement apps apps-generated Word templates and Office Give-and-take. In the next department, yous'll be adding XML content control fields to the Word template.

Warning

A few things can cause Give-and-take to freeze, requiring you to utilise Chore Manager to stop Word:

  • Y'all insert a content control other than Picture or Plain Text.
  • You make a textual change, such as changing the capitalization or calculation text, to a content control. These changes can occur through AutoCorrect every bit well as user edits. By default, Microsoft Word AutoCorrect capitalizes sentences. When you add a content control field, Discussion sees it every bit a new sentence and will capitalize it when focus shifts away from the field.

To prevent issues with control fields, practise the following:

Only add fields as Apparently Text or Picture

  1. Yous employ the XML Mapping Pane to add together entity fields to your Word template. Exist sure to just add fields every bit Plainly Text or Pic.

    Insert the field as Plain Text.

Exercise not make whatsoever textual changes to the added content control

  1. You can make formatting changes to content control fields, such as bolding the text, but no other textual changes, including capitalization changes.

    Don't change any text in these fields!.

    If y'all experience Discussion freezing or operation degradation, try turning off AutoCorrect.

Turn off AutoCorrect

  1. With the template file open in Word, go to File > Options > Proofing > AutoCorrect Options.

    In Word, select Proofing > AutoCorrection Options.

  2. Deselect Capitalize first letter of sentences and Automatically use suggestions from the spelling checker.

    Deselect the AutoCorrect settings.

  3. Deselect Hyphens (--) with dash (-) on the AutoFormat and AutoFormat every bit You lot Blazon tabs.

  4. Click OK.

    If you followed the above recommendations, yous're gear up to define the Word template.

Stride 3: Define the Word template

Use the XML Mapping Pane to ascertain the Give-and-take template with entity fields.

  1. In your Word template, click Developer > XML Mapping Pane.

    Select XML Mapping Pane in the Word ribbon.

    The default XML schema is selected.

    The default XML Mapping schema.

  2. Select the XML schema. Information technology will begin with "urn:microsoft-crm/certificate-template/".

    Select the XML schema.

    Important

    If y'all have frequent accidental edits that crusade Word to freeze or have performance degradation, be sure to turn off the AutoCorrect options co-ordinate to the section: "A known issue and how to avoid it".

  3. Expand the entity, right-click the entity field, and and so click Insert Content Control > Plain Text.

    Insert the field as Plain Text.

    The entity field is added to the Word template.

    The field is inserted into the Word template.

    Add additional entity fields, add descriptive labels and text, and format the document.

    A completed template might look like this:

    Sample Word template.

    Some content command fields you lot entered likely have multiple lines of data. For instance, accounts have more than than i contact. To include all the data in your Give-and-take template, set the content control field to echo.

Set content control fields to repeat

  1. Put fields with repeating information in a tabular array row.

  2. Select the entire tabular array row in the template.

    Create a table and add content control fields.

  3. In the XML Mapping Pane, right-click the relationship containing the content control fields, and then click Repeating.

    Set the table row to repeating.

    When you use the Word template in customer engagement apps to create a certificate, the table volition populate with multiple rows of data.

    When the template has the fields and formatting you want, relieve it and upload it into customer engagement apps.

Stride 4: Upload the Give-and-take template back into client engagement apps

When y'all accept your Discussion template congenital the way you desire, save it so you tin can upload it into client engagement apps.

Admission to the newly created Word template depends on how y'all uploaded it and to the access granted to the security role. Be sure to bank check out Use Security Roles to control access to templates.

Administrators can use the Settings page to upload the Word template into customer date apps. A template uploaded in Settings is available to all users in your organization.

For admins: Upload the Word template into client engagement apps

  1. Go to Settings > Templates > Document Templates.

  2. Click Upload Template.

  3. Drag the Give-and-take file in the dialog box or scan to the file.

    Upload Template dialog box.

  4. Click Upload.

    Non-admin users tin can upload a template for their ain utilize from a list of records.

For non-admins or admins wanting to create a personal template: Upload the Word template into customer engagement apps

  1. Open a page with a listing of records, for example, the list of customer accounts in Sales.

  2. Select a single item such as an account, click More () > Word Templates > Create Word Template.

  3. Click Word Template > Upload.

    Click Upload to bring the template into customer engagement apps.

  4. Drag the Give-and-take file in the dialog box or scan to the file.

  5. Click Upload.

Step 5: Generate a document from the Give-and-take template

To utilise the Word template you've created, do the post-obit:

  1. Open a record with information you desire to create a document. For example, open a customer account record in Sales.

  2. Click More () > Discussion Templates, and and so under Word Templates select the template you lot created.

    If the template you created is not visible, there are two possibilities:

    1. Just templates built for the selected record type (entity) volition be displayed. For instance, if you open an opportunity record, you will non see a template you created with the Account entity.

    2. You lot need to refresh customer date apps to come across the template. Either refresh your browser or close and reopen customer engagement apps.

    After yous select your Word template, customer engagement apps create a Discussion document from the record you lot selected.

Try out the sample Discussion templates

At that place are five Give-and-take templates included with customer appointment apps.

These templates are included with customer engagement apps.

The sample Give-and-take templates were created with a item tape type (entity). Y'all'll only be able to apply the template to records of the same record type.

Name Entity
Opportunity Summary Opportunity (Sales area)
Campaign Summary Campaign (Marketing surface area)
Case Summary Case (Service area)
Invoice Invoice (Sales surface area)
Business relationship Summary Client_Account (Sales, Service, and Marketing areas)

To apply a sample Discussion template

  1. Open up a record with data with the entity type that matches the sample template. For example, open a customer account record in Sales to utilise the Business relationship Summary template.

  2. Click More () > Word Templates, and then under Discussion Templates select the sample template.

    Open up the newly-created Give-and-take template and requite it a expect.

Note

You tin review just not edit templates that are included in customer engagement apps.

Additional considerations

Use Security Roles to control access to templates

Administrators tin control access to Word templates with some granularity. For example, y'all can give salespeople Read merely not Write access to a Word template.

  1. Click Settings > Security > Security Roles.

  2. Select a role, and so click the Concern Management tab.

  3. Select Document Template to set access for templates bachelor to the unabridged arrangement. Select Personal Document Template for templates shared to individual users.

  4. Click the circles to adjust the level of access.

    Adjust access using the security role.

Lists in created documents are not in the same social club as records

Lists of records created from a custom template may non appear in the aforementioned guild in Word documents every bit the order in customer engagement apps. Records are listed in the guild of the time and appointment they were created.

See also

Clarify your data with Excel templates

Troubleshooting Word templates