Creating a mail merge template
Before starting to configure Mail Merge on VISUAL PLANNING, you must create a WORD or PENTAHO destination document. This template must contain the empty spaces that VISUAL PLANNING will fill as necessary.
The settings of the VPPublipost module can be accessed from the module configuration window.
Go to the Settings tab > Configuration pane > Click on VPPublipost.
In the window displayed, right-click on VPPublipost Templates > Create a VPPublipost template .
The corresponding part is then enabled:
Specify the characteristics of the mail merge context, then confirm by clicking OK.
The following characteristics must be entered:
This represents the creation date and time and the most recent change to the template, together with the login of the user who performed these actions.
This property is updated automatically.
This enables you to choose an Attachment type of form heading to which the mail merge result will be attached.
For each mail merge, the result is attached to this heading. If it accepts several attached files, the results of the most recently generated mail merges will be conserved. The most recent appears at the top of the list.
In the case of Pentaho, the heading must be in file download.
If no heading is defined, a window asking you to open the generated files will be displayed after the mail merge.
This functionality limits the number of data items that will be available in the merge fields when entering values originating from VISUAL PLANNING.
If no properties are published, all the VISUAL PLANNING data will be sent and can be used as merge fields.
If the mail merge result is not attached to a heading, or if the Attachment heading selected above is local, define a directory where all the edited mail merges will be saved.
This directory must be accessible for all users.
If the mail merge result is not attached to a heading, or if the Attachment heading selected above is local, you can specify the tree structure of directories where the mail merge result is saved, thanks to the headings of the dimension.
Each selected attribute will constitute a folder in the backup directory.
This field enables you to choose the source of the mail merge template: MS Word or Pentaho Report.
This functionality will enable you to generate a single document for all the source data used.
In other words, if you check this box, instead of obtaining a document for each event, VISUAL PLANNING generates a single document for all the selected events.
The name of the file generated for a mail merge can be defined in line with the attributes of the event.
Select the attributes used to name the mail merged files. If there are spaces between the attributes, they will be replaced by _.
To specify that the result must be generated in the PDF format.
This is only operational for Word 2010 and higher (and Word 2007 with an add-on).
Check this box to add a yyyymmdd_hhmmss suffix at the end of the file when it is generated.
This functionality is used to select the mail merge template file using the button:
Two situations may arise, depending on the origin of the mail merge template.
If the mail merge template is from MS Word, you should click the button.
This starts Word and enables you to enter the values from the schedule that will be used for the mail merge. When you save the Word file after defining your mail merge, the following dialog box is displayed:
To take account of the new definition, you must of course answer yes.
If the mail merge template is from Pentaho, you will enter the values from the schedule directly in the Pentaho tool in VISUAL PLANNING.
However, you can download the file by clicking on the button.
Once the mail merge context has been configured you must export it in XML format by right-clicking on it:
Then, in the Pentaho tool, you must add the XML file exported from VISUAL PLANNING by clicking on Data > Add Datasource > XML:
The following window opens:
Click on the button to choose the XML file exported from VISUAL PLANNING, and then on the icon to add a value
Lastly, add the /*/* value in the note field right at the bottom:
Now click OK or Preview to verify that the data is accessible.
Make the required modifications and matching operations on Pentaho and save your PRPT file.
Once your file has been saved on Pentaho, you must return to the mail merge template to attach the .prpt file to the template by clicking on the button.
In a situation where you choose to store the file generated by the mail merge in an attachment type of form heading, it is possible to generate mail merge documents automatically by checking the Event creation/modification box.
A mail merged file will be generated and stored in the form heading whenever an event is created or modified.
For this to happen, the files in the attachment type heading must be downloaded.
To modify an existing template, go to the Settings menu > Configuration pane > VPPublipost, then click on the template to modify.
The corresponding part is then enabled. Modify the parameters (see Creating a mail merge template), then click on OK to save your changes.
Yes to definitively delete the context,
No to cancel the deletion.