Sometimes you need to create a more traditional paper mailing for your campaigns, but that doesn’t mean that you need to jump through a lot of hoops in order to get it done. The Campaigns function within Dynamics AX 2012 has the ability to create mail merge exports directly from the application that can then be married up to Word mail merge templates. Once you have set this up, your standard mailings are just a matter of clicking a couple of buttons.
Let’s keep the USPS in business people.
How To Do It…
First we need to create a mail merge source file. To do this open up your Campaign with all of the targets selected, and click on the Mail Merge File menu button within the Create group of the Targets tab.
When the Mailing File dialog box is displayed, specify a file path for a .csv file that you will be using to store all of your mail merge data within, and then click the OK button.
When you open up the .csv file, you will see that all of the contact information for the Campaign Targets will be there and formatted for you.
Now we will want to create a mail merge template that we will use as the basis for our campaign mail merge. To do this, open up Word, and select the Use an Existing List menu item from the Select Recipients button within the Create Mail Merge group of the MAILINGS ribbon bar.
Then select the mail merge file that was created in the previous step.
When the File Conversion dialog box is displayed, just select the Other Encodings option, and click the OK button.
To check that the file has been read correctly, click on the Edit Recipient List button within the Start Mail Merge group of the MAILINGS ribbon bar and you should be able to see all of the records that were transferred from the campaign.
If this is the first time that you are doing this, then you may also have to click on the Match Fields button within the Write & Insert Fields group of the MAILINGS ribbon bar and make sure that all of the fields from the campaign match up to the ones that Word are expecting.
Now all you need to do is select the fields from the Insert Merge Fields button within the Write & Insert Fields group of the MAILINGS ribbon bar and add them to the document.
After you have created your mailing, save the template mail merge document.
How It Works…
To perform the mail merge, click on the Mail Merge File button within the Broadcast group of the Targets ribbon bar of the Campaign maintenance form.
This will show you a list of all your extracts for the Campaign. Find the extract that you want to use and then paste in the path of the Word template mail merge file that you created.
To link the data with the template, just click on the Template File button.
This will open up the template file and you can click on the Edit Individual Documents link under the Finish & Merge button within the Finish group of the MAILINGS ribbon bar.
This will create all of your merged files for you incorporating all of the data from the campaign.