Microsoft Word provides powerful ways to present your Dynamics 365 Sales data in a standardized and well-formatted document. Use Word templates to ensure that all the documents that go out to your customers have a consistent look per your organization’s branding. You can easily create and share your template with others.
License and role requirements
You must have
Dynamics 365 Sales Premium, Dynamics 365 Sales Enterprise, or Dynamics 365 Sales Professional More information: Dynamics 365 Sales pricing
Follow the steps in this topic to successfully create Word templates in Dynamics 365 Sales Professional.
Step 1: Create a Word template
Make sure you have the System Administrator role in Dynamics 365 Sales Professional.
In the site map, select Sales Settings.
Under Advanced Settings, select Excel and Word Templates.
Select New template.
In the Create Template Type pane, select Word Template, and then select Next.
Select the entity to which the template applies. The template will use data from this entity.
To add the fields that you want to be included in the Word template, select Choose Related Entities. The Choose Related Entity dialog box opens.
The relationships you select on this screen determine which entities and fields are available later, when you define the Word template. Select only the relationships you need to add Dynamics 365 Sales Professional data to the Word template. When you’re done, select Done.
Here are some example relationships for the Account entity:
1:N Relationship. An account can have multiple contacts.
N:1 Relationship. A lead, account, or contact can have multiple accounts.
N:N Relationship. An account can have multiple marketing lists. A marketing list can have multiple accounts.
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 account, and you want to include a list of its contacts, the document will return at most 100 of the account’s contacts.
In the Select Entity dialog box, select Next.
Select Download to create a Word file on your local computer with the exported entity included as XML data.
To upload the template later, select the Upload the template later check box, and then select Next.
To upload the template after you customize the data, go to the list of templates, and then select Upload Template.
Open the Word template file. At this point, the document appears to be blank.
To see and add Dynamics 365 Sales Professional XML data, you need to enable the Word Developer tab.
Go to File > Options > Customize Ribbon, and then select the Developer check box.
The Developer tab now appears in the Word ribbon.
Step 3: Define the Word template
Use the XML Mapping Pane to define the Word template with Dynamics 365 Sales Professional entity fields.
In your Word template, select Developer > XML Mapping Pane.
The default XML schema is selected.
Select the Dynamics 365 Sales Professional XML schema. It will begin with “urn:microsoft-crm/document-template/”.
If you have frequent accidental edits that cause Word 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 it”.
Expand the entity to see all available fields, right-click the field you wish to add, and then select Insert Content Control > Plain Text.
The field from Dynamics 365 Sales Professional is added to the Word template.
Add additional entity fields, add descriptive labels and text, and format the document.
A completed template might look like this:
Some content control fields you entered likely have multiple lines of data. For example, accounts have more than one contact. To include all the data in your Word template, set the content control field to repeat.
Set content control fields to repeat
Put fields with repeating data in a table row.
Select the entire table row in the template.
In the XML Mapping Pane, right-click the relationship containing the content control fields, and then select Repeating.
When you use the Word template in Dynamics 365 Sales Professional to create a document, the table populates with multiple rows of data.
When the template has the fields and formatting you want, save it, and upload it into Dynamics 365 Sales Professional.
Step 4: Upload the Word template back into the Sales app
When you have your Word template built the way you want, save it so you can upload it into Dynamics 365 Sales Professional.
An administrator can use the Advanced Settings page to upload the Word template into Dynamics 365 Sales Professional.
Users in your organization can see the templates available to them by selecting the Word Templates button on the command bar in the list of records.
In the Sales Professional app, go to Advanced Settings > Excel and Word Templates.
Select Upload Template.
Find and upload the file.
You’ll see the summary of the file you’re uploading.
Your organization is using a custom app. Check with your administrator for exact steps. The steps described in this article are specific to the out-of-the-box apps such as, the Sales Hub or Sales Professional app.