Create a document template and associate it with a document type
Important
This content is archived and is not being updated. For the latest documentation, see Microsoft Dynamics 365 product documentation. For the latest release plans, see Dynamics 365 and Microsoft Power Platform release plans.
Applies To: Microsoft Dynamics AX 2012 R3, Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012
When you create a new document, you can transfer data from tables in Microsoft Dynamics AX to bookmarks in the new document. To do this, you create a template that contains some standard text and some bookmarks where the data is to be inserted. For example, you can transfer the address and contact information for a customer to the letter header in a Microsoft Word document when you create a new letter for that customer.
Before you begin, you must create a Word template that contains bookmarks where the data should be inserted. Then you set up the document type by linking the document type to the template and adding the data fields that should be transferred to the individual bookmarks.
Create a new Word template
From the Start menu on your computer, click All Programs > Microsoft Office > Microsoft Office Word.
In the new template, add the text and graphics that should appear in all new documents that you base on the template.
Place the cursor where data should be inserted from Microsoft Dynamics AX, and then click Insert > Bookmark.
Type a name for the bookmark, and then click Add.
Repeat steps 3 through 4 for each bookmark to include in the template.
On the File menu, click Save As.
In the File name field, enter a name for the new template.
Important
The file name must not contain any spaces.
In the Save as type field, click Document Template, and then click Save.
Link a template to a document type
Click Organization administration > Setup > Document management > Document types.
Select the document type to link to a template.
Click Options.
In the Table field, select the table to associate with the template.
In the Template file field, enter the path for the template file.
Add bookmark information to table fields
Click Organization administration > Setup > Document management > Document types.
Select a document type, and then click Options to open the Setup form.
Select the table that is linked to the template to use, and then click the Field: tab.
Press CTRL+N to add a field to be transferred.
In the Data table field, select a table to obtain data from.
In the Data field field, select a field to obtain data from.
In the Bookmark field, type the name of the bookmark that you inserted in the document template.
Optional: Select the Hard return check box to insert a line break after the data is inserted.
Repeat steps 4 through 8 to add more data fields to the list.
Note
The table that you get the data from does not need to match the table that you selected on the Overview tab, but the two tables must be related.