Follow me on Twitter

A technical eye on Microsoft Dynamics NAV

XML Stylesheets for Dynamics NAV: Adding Your Logo

in Functionality by Ian Crocker


As we know, Microsoft Dynamics NAV 5.0 includes a new feature which allows you to export data from Dynamics NAV to other applications.

A number of stylesheets are provided with the product for use when exporting to Microsoft Office Word and Excel.

From a Sales Order for example, we can click the Send To Microsoft Office Word button and we get a nicely formatted Sales Order presented to us in Microsoft Word.

So what’s the first thing we are going to want to change?

That’s right, the logo.

We want it to show ours, or our customers lovely emblem instead.

Step forth the Creating XML Style Sheets for Data Export White Paper from Microsoft Dynamics NAV 5.0 techincal white paper available via PartnerSource.

This document contains a section titled Adding Your Logo to a Style Sheet.

Perfect you may think, until you follow the instructions to the letter and all you get is a placeholder where the image should be.

Why? Because there is an error in the white paper guide.

These are the steps quoted directly from the document:

  1. Open the customer card for customer number 10000 and click Send to Microsoft Office Word button to create a Word document using the CustomerLetterToWord.xslt style sheet.
  2. In Word, replace the CRONUS logo with the appropriate logo. Save the document as XML.
  3. Open the XML file with Visual Studio. Select the text that defines the logo graphic. This is the text between the w:bindata and /w:bindata tags. Copy the text.
  4. Open the CustomerLetterToWord.xslt in Visual Studio. Select the text between the <w:bindata> and< /w:bindata> tags and paste.
  5. Save the modified style sheet with a new name and import it into Microsoft Dynamics NAV, in the manage Style Sheets window.

At first you think it may be related to the note which appears after step 4…

..No. Checked that. It still doesn’t work.

The reason is that in both steps 3 and 4 of the guide, the tags which are referenced should read <w:pict> and </w:pict>.

Copy the text between these tags instead and you can marvel at your glorious logo:

2 Comments

  1. thanks nice solutions …. keep it ….:)

Leave a response

What's cooking?

Photo credits

View Ian Crocker's profile on LinkedIn