Thursday, 3 May 2007

Dynamics NAV 5.0 - Send to Application Feature - Part 1

There are four new buttons on the toolbar for Microsoft Dynamics NAV 5.0. This posting starts to look at the three buttons used for sending data to other programs.

You’ll find the relevant help topic under Welcome to Dynamics NAV Help > Using Microsoft Dynamics NAV > Sending Data to Other Programs. This tells us that we can export data from NAV to other programs such as Microsoft Office Word or Excel. You can also export data to any other program that can handle an XML file.

To see this in action, use the CRONUS demo company for version 5.0 and open a customer card (Sales & Marketing > Order Processing > Customers); I am using customer account 10000 for The Cannon Group PLC. Now click on the Send to Microsoft Office Word button (or use the Ctrl+W shortcut key).

Word springs into life with a new document (called “10000 The Cannon Group PLC – Customer Card.xml”), stored in your temporary file path.

The sample document is a letter formatted to contain a CRONUS company logo and address details, Customer Address Details, Today’s Date, Salutation, etc. There is a place for you to type your letter contents.

Close Word and return to Dynamics NAV. Now hit the Send to Microsoft Office Excel button (you could use the Ctrl+E shortcut).

This time Excel opens and we are looking at another xml file. There is one Excel sheet within the workbook for each of the tab pages on the NAV form. Each sheet contains a title, the caption for the tab and the labels and data values for each of the fields on the tab page.

From Office 2003 onwards, Microsoft provided the ability to save a Word or Excel document as an XML file using their WordprocessingML or SpreadsheetML schemas. The new feature in Dynamics NAV takes advantage of this by grabbing the information on the screen and generating an XML file which it then transforms into another format by using a pre-defined XSLT (a file that describes how one XML file should be transformed into another).

You can create your own XSLT files and load them into NAV so that they can be used to make transformations. You can even specify your own applications to handle the new file, so you are not limited to using only Word or Excel.

I have two issues with this new feature. 1) Creating the XSLT file is not easy. If you have the ability to do this, you could probably have written some C/AL code to create the Word document directly. 2) Why would you use this feature? I am really struggling to think of a situation where this would be useful. If anyone has any suggestions, I would like to know.

I could only think of one possible use for this: if I wanted to write a user training document or document a test case and I wanted to list all of the fields on a form, this would be quite a neat way of doing it, but this is not a typical scenario for an end-user. Maybe I am not thinking laterally enough.

In the next post on this subject, I’ll take a look at how to set up a new XSLT so I can see what NAV is giving us to work with. Then, I’ll look at creating a Word document from scratch by making a new XSLT for WordprocessingML.

1 comment:

cap'n hands said...


I have a Windows XP computer on which both Microsoft Office 2003 and Microsoft Office 2007 is installed. Is it at all possible to choose which version of Word and Excel are used when using the Send to Word or Send to Excel buttons in NAV?