- Blog Blog


Hello and welcome to our blog! What can we do for you? Are you looking for further technical information or step-by-step instructions to our products? Or would you like to read the latest news on mscrm-addons? Please feel free to browse our blog for detailed information and to share our posts!

.dot Templates including line items

This article outlines how to to deal with line items in a Word-Template.

Requirements: DocumentsCorePack

Changes to the template for an order:
The only exception is that the fields for a quote have been changed to the attributes for the order. The explanation can be visualized with the “” template which comes with the WordMailMerge-Server-Setup. After choosing the template that you want to use, make sure that you swith to directory in the main document setup! This is necessary as otherwise a new page will be used for every item.

Figure 1: Switch directory in the main document setup

To show the whole content of the document press [Alt] +[F9]. See next screenshot:

Figure 2: Show the content of the document

Basically we use if-statements and the MS Word field "mergesequence" to deal with multiple line items. The number of mergesequences is equal to the number of line items. so e.g if you have a quote with 9 products(line items), 9 mergesequences will run in MS Word.

Therefore, to place the header we ask if the Mergesequence = 1.
The syntax is {if  EXPRESSION1 operator EXPRESSION2 "if true - text" "if false-text"}

For example:

Figure 3: Example for syntax

As you can see, the adress lines and customer-details (called "Lieferschein") in this case, will only be shown once.

IMPORTANT: Pay attention to the anchor of the objects you want to show in the header. All elements have to be anchored within the if-statement!!
e.g If you change the format, make sure that the anchor lies on the if-statement again afterwards.

Figure 4: Make shure that all elements are anchored

The same counts for the footer! All objects in if (“LastItem” = 1 ) are anchored here

The LastItem automatically comes out of the CRM system with the last choosen data record.

Figure 5: Anchor the footer

ATTENTION : Always check that the anchor lies in the if-statement !! otherwise the object will be shown for every data set that’s chosen!

These anchors can be moved so that you can format all fields! (Also the columen width of the tables etc.)

For example : put in space between zip code and town/city

Figure 6: Put in a space between ZIP Code and Town/City

2; Now all that you have to do is find the position between the two fields and insert a .

Figure 7: Insert a space between two fields

Should you want to format the date field(s) then please check the following link :

That’s it! We appreciate your feedback! Please share your thoughts by sending an email to

Comments are closed.