Word Templates and Word merge in Business Central
Mail Merge in Business Central
You can use the mail merge functionality in Word to use data from Business Central to add a personal touch to bulk communications.
When you want to send a document to a lot of recipients (for example, to your customers and contacts as part of a sales campaign), you can use Word’s mail merge capability to personalize each document by pulling data about the recipients from Business Central.
Scenario
For example, you can create brochures to alert customers about a sales campaign, letters to inform vendors about a new purchasing policy, or invitations to attract contacts to an upcoming event.
https://docs.microsoft.com/en-us/dynamics365/business-central/ui-mail-merge
How the System Works
On the Word Templates page, you can use an assisted setup guide to download a ZIP file that contains a DataSource.txt and a Word template file for an entity. After you set up the template and add merge fields, you use the same guide to upload the template.
You can only use the Word template and data source files that you download from Business Central, and you must store the files in the same location; you can use Word templates only on devices with Microsoft Word 2019.
Testing Word Merge
Let’s start by looking for Word Templates from Search
At this point the system asks us to create a new word template based on the existing entities, or to activate other entities
We can now download the templates to be used in word to manage the word merge; it is a pair of files to be used together
These are the 2 files:
This file allows mapping between Business Central and Word
Edit file in Microsoft Word, insert and use Word Merge fields from Fields List
When you have finished editing from Word, you can load the modified word template, activated to manage the mail merge.
Upload and create a template ready to use
Once loaded will be visible in the model list
Example
Apply Word Template
With Apply Word Template, the modified word template is applied to the template associated with the entity
You can select the required Output format (there are several possibilities)
After applying, the system proposes the expected result, how many records will be extracted and in what format; it’s also possible to perform Split on documents (e.g. one document for each customer).
Files created
At the end the word merge files are created in .ZIP format
“The Final result”
Example
ALMOST THERE!
How to add New Entities
The functionality can be expanded by adding other unmapped entities
How to add other entities (existing but not mapped)
Add New Entities Example
Select the entity from the entities list
Word Templates can be called up from the Customer List and from Customer Card and from other pages.
Example
Thank you for your advice!
In my opinion this is a big step back in comparison to NAV2018.
– It’s not possible to insert Salutation formular.
– It’s not possible for the User to write letters or e_mails from the contact and store them in the activity.
Or do you have Soultions for these issues or knowledge that Micrisoft is working on these issues?
Thank you in advance.
@Lorenz,
You are right, Salutations are missing in Word Templates (Codeunit 5045, WordManagement).
And as Microsoft failed in BC18 to add Events which allow us to add additional Fields (like the salutations), we – developers – don’t stand much chance to correct that.
Missing salutations is an issue since 2005 when I first came into contact with Word-Templates in Navision. As this problem is known by Microsoft but has not been addressed in the last 16 years, I have little hope that Microsoft will address it in then next 10 years. So no, the chances that Microsoft is working on this issue is close to Zero.
Furthermore, the programming code of the WordManagement codeunit is mostly commented as “obsolete” which let’s me assume that the Word Template functionality will either disappear completely in the next 1-2 years (thus 2022-2023) or be replaced by something newer, better and more Cloud-compatible.