O'Reilly logo

Microsoft Dynamics AX 2012 Development Cookbook by Mindaugas Pocius

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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.

Getting ready

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required