Create a dynamic Word template
You can create a Word template in Power Apps from two different areas:
Advanced settings - Using this area requires specific permissions that are available through the System Administrator or System Customizer security roles.
From a specific record - When the record is open (main form) or selected in a list (view), those templates are available only for the user who created them.
This module focuses on personal templates.
Create a dynamic Word template
To create a Word template based on Dataverse, follow these steps:
In a model-driven app, select a specific record from a view for a target table. From the Word Templates dropdown menu, select Download Template. Depending on your browser window width, you may need to first select on the ellipsis to select Word Templates from the dropdown menu.
In the displayed form, confirm or select another table (entity) and indicate if any records that are related to this table are required in the template (by using the different relationship options). Select Download to proceed to the next step.
Open the generated Word template (downloaded on your local computer). If the Developer option isn't available in the menu, enable this option from Files > Options. Select Customize Ribbon, enable Developer, and then select OK to confirm.
Define which fields are available for the template. To do so, select XML Mapping Pane on the Developer menu. Select the Custom XML Part that starts with urn:microsoft-crm/document-template/.
On the XML Mapping pane, right-click the fields to add them to the document. Then, select Plain Text or Picture under the Insert Content Control menu.
Select, position, and format the fields within the document. A document might resemble the following screenshot.
When the template is ready to be used in the application, upload the saved version of the file. In the same model-driven app and view that you used in a previous step, select a specific record. From the Word Templates dropdown menu, select Upload Template.
In the form, select Choose File for the newly created template. Select Upload to proceed.
The template is available to use for any selected record of the table that it uses as a data source. To generate a new document for a record, select the template in the Personal Word Templates section of the Word Templates dropdown menu.
The generated document that's uploaded to your local computer is based on the template but with the information from the selected record. The following screenshot shows an example of a generated document.
Next steps
Now, you've learned how to create a Word template that uses Dataverse as a data source to generate standardized documents. Next, you'll learn how to create a work order template.