Creating a Word document with repeating elements
Microsoft Office Word documents created from Dynamics AX code, besides simple data output, can have more complex structures, such as a dynamic number of repeating elements. For example, a collection letter document can have a variable list of overdue invoices for different customers.
In this recipe, we will create a Word document with repeating elements. For this demonstration, we will display the contents of the LedgerParameters table in a dynamically generated Word table.
For this example, we need to prepare a new Word template and save it as a file named table.dotx. The template should contain one bookmark named TableName at the top, and one table beneath with a single row and two ...