Use Word templates to create standardized documents

After you create and import Role Word templates into customer engagement apps (Dynamics 365 Sales, Dynamics 365 Customer Service, Dynamics 365 Field Service, Dynamics 365 Marketing, and Dynamics 365 Project Service Automation), with 1 click users tin generate standardized documents automatically populated with data. This feature has some special considerations yous should know well-nigh to successfully create Discussion templates.

The post-obit are the supported versions of Word.

Area Give-and-take Version
Creating a Word template 2013, 2016
Using a Word document generated in customer engagement apps 2010, 2013, 2016

Note

Macro-enabled Give-and-take documents (.docm) are not supported.

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

Stride 1: Create a Discussion template

Where y'all can create a template

There are three places in customer engagement apps where you lot can create a Word template:

  • From the Settings page. Get to Settings > Templates > Certificate Templates > New(New or Add button.). You'll need sufficient permissions to access to the Settings folio, such as System Administrator or System Customizer.

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

  • From a listing of records. For example, go to Sales > Client_Accounts > My Active Accounts. Select a single account, and then click More () > Give-and-take Templates > Create Give-and-take Template.

    Create a Word template from an entity.

Tip

To delete personal document templates, do the post-obit:

  1. Click Avant-garde Find (Screen shot of Advanced Find button.).
  2. For Expect for, select Personal Document Templates.
  3. Click Results (!).
  4. Select the personal document template to delete and and so click Delete (Delete button.).

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

After clicking Create Give-and-take Template, select an entity to filter with, and then click Give-and-take Template > Select Entity.

Choose Word Template and select entity.

The relationship pick page appears.

Select entities for the Word template.

What are 1:Northward, North:1, and N:Due north relationships?

This screen requires an understanding of your customer engagement apps information construction. Your administrator or customizer can provide information about entity relationships. For admin content, see: Entity relationships overview.

Here are some example relationships for the Business relationship entity.

Relationship Description
A 1:N entity relationship. An account tin can take multiple contacts.
An N:1 entity relationship. A atomic number 82, business relationship, or contact tin can take multiple accounts.
An N:N entity relationship. An account tin can take multiple marketing lists.

A marketing list can accept multiple accounts.

The relationships yous select on this screen determine what entities and fields are available later when you lot ascertain the Word template. Only select relationships you need to add data to the Word template.

Note

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

Download the template

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

Important

Document template downloaded from i environment can only be used inside that surroundings. surroundings to environs migration for Word or Excel templates isn't currently supported.

Step two: Enable the Developer tab

Open up the Word template file. At this signal, the certificate appears to be bare.

The Word template when first opened.

To come across and add together customer engagement apps XML data, y'all need to enable the Discussion Developer 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 avoid it

At that place's a known issue with customer engagement apps apps-generated Word templates and Office Discussion. In the next section, you lot'll be adding XML content control fields to the Word template.

Warning

A few things can cause Word to freeze, requiring you to utilise Task Manager to stop Discussion:

  • You insert a content command other than Picture or Manifestly Text.
  • You lot make a textual change, such every bit changing the capitalization or calculation text, to a content command. These changes can occur through AutoCorrect likewise equally user edits. By default, Microsoft Word AutoCorrect capitalizes sentences. When you add together a content control field, Word sees information technology as a new sentence and will capitalize information technology when focus shifts abroad from the field.

To prevent bug with control fields, practice the following:

Merely add fields as Plain Text or Picture

  1. You use the XML Mapping Pane to add entity fields to your Word template. Exist certain to only add fields equally Plain Text or Picture.

    Insert the field as Plain Text.

Do non make any textual changes to the added content control

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

    Don't change any text in these fields!.

    If you experience Word freezing or performance degradation, try turning off AutoCorrect.

Plough 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 as Yous Type tabs.

  4. Click OK.

    If you followed the higher up recommendations, y'all're ready to define the Discussion template.

Pace 3: Ascertain the Word template

Use the XML Mapping Pane to define the Word 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 volition brainstorm with "urn:microsoft-crm/document-template/".

    Select the XML schema.

    Important

    If you have frequent accidental edits that cause Give-and-take to freeze or have performance degradation, be sure to turn off the AutoCorrect options according to the section: "A known issue and how to avoid information technology".

  3. Expand the entity, right-click the entity field, and then click Insert Content Control > Obviously 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 similar this:

    Sample Word template.

    Some content control fields you entered likely have multiple lines of data. For instance, accounts have more than 1 contact. To include all the data in your Word template, fix the content control field to repeat.

Set up content control fields to repeat

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

  2. Select the unabridged table row in the template.

    Create a table and add content control fields.

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

    Set the table row to repeating.

    When you use the Word template in client engagement apps to create a document, the table will populate with multiple rows of information.

    When the template has the fields and formatting you desire, salvage it and upload information technology into client appointment apps.

Step four: Upload the Word template dorsum into client date apps

When you have your Word template built the way you want, save it then you can upload information technology into customer engagement apps.

Admission to the newly created Word template depends on how yous uploaded it and to the admission granted to the security office. Be certain to bank check out Utilise Security Roles to control access to templates.

Administrators can utilise the Settings page to upload the Word template into customer engagement 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. Get to Settings > Templates > Document Templates.

  2. Click Upload Template.

  3. Elevate the Give-and-take file in the dialog box or browse to the file.

    Upload Template dialog box.

  4. Click Upload.

    Not-admin users can upload a template for their own use from a list of records.

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

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

  2. Select a unmarried item such as an business relationship, click More () > Discussion Templates > Create Word Template.

  3. Click Give-and-take Template > Upload.

    Click Upload to bring the template into customer engagement apps.

  4. Drag the Discussion file in the dialog box or browse to the file.

  5. Click Upload.

Step v: Generate a certificate from the Word template

To use the Word template you've created, practice the following:

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

  2. Click More () > Give-and-take Templates, and then nether Word Templates select the template you created.

    If the template y'all created is non visible, there are two possibilities:

    1. Only templates built for the selected record type (entity) will be displayed. For example, if you open an opportunity record, you will not see a template you lot created with the Business relationship entity.

    2. You need to refresh customer engagement apps to encounter the template. Either refresh your browser or close and reopen customer engagement apps.

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

Try out the sample Give-and-take templates

In that location are 5 Word templates included with customer engagement apps.

These templates are included with customer engagement apps.

The sample Give-and-take templates were created with a particular record type (entity). You'll only exist able to apply the template to records of the same record blazon.

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

To utilise a sample Word template

  1. Open up a record with information with the entity type that matches the sample template. For case, open a customer account record in Sales to use the Account Summary template.

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

    Open the newly-created Word template and give it a look.

Annotation

You tin can review but not edit templates that are included in customer appointment apps.

Additional considerations

Use Security Roles to control access to templates

Administrators can control access to Word templates with some granularity. For instance, y'all can requite salespeople Read but non Write admission to a Word template.

  1. Click Settings > Security > Security Roles.

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

  3. Select Document Template to ready access for templates available to the entire organization. Select Personal Document Template for templates shared to private 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 order as records

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

See also

Analyze your data with Excel templates

Troubleshooting Word templates