Book Image

Microsoft Dynamics AX 2012 R3 Development Cookbook

By : Mindaugas Pocius
Book Image

Microsoft Dynamics AX 2012 R3 Development Cookbook

By: Mindaugas Pocius

Overview of this book

<p>Microsoft Dynamics AX 2012 R3 Development Cookbook will help you manage your company's or customer's ERP information and operations efficiently. Beginning with exploring data manipulation concepts in Dynamics AX, you will build scripts to assist data migration and organize data in AX forms. You will learn how to create custom lookups using AOT forms and generate them dynamically. After this, you'll learn how to enhance your application by using advanced form controls, and integrate your system with other external systems. You will also learn how to enhance your user interface using various Dynamics AX UI elements.</p> <p>This book will help you look at application development from a business process perspective, and develop enhanced ERP solutions by learning and implementing the best practices and techniques.</p>
Table of Contents (16 chapters)
Microsoft Dynamics AX 2012 R3 Development Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Creating a Word document from a template


Microsoft Office Word allows presenting Dynamics AX data in a variety of formats.Using Word templates makes things even more easier. The newly introduced Microsoft Office add-ins also provide a user friendly way to do this.

If add-ins have not been installed, Dynamics AX still allows you to create Word documents from the code. Although there are no Dynamics AX application classes for Word as we have for Excel, Word documents can still be created using a very similar approach by calling the COM components directly. The only inconvenience is that IntelliSense in the code editor will not provide method suggestions. However, the methods and their parameters can be easily looked up in the online MSDN library.

In this recipe, we will create a simple Word document from a template. We will use the COM component model to read a Word template and fill it in with data from the system.

Getting ready

Before we start with the code, we have to create a new Word template...