This is a migrated thread and some comments may be shown as answers.

Mail Merge using "conditions" does not work

5 Answers 197 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Blessy Antony
Top achievements
Rank 1
Blessy Antony asked on 06 Feb 2015, 12:35 PM
1.Imported a word document with conditional merge filed ({ IF "{ MERGEFIELD Gender }" = "Male" "Sir" "Madam" }).
This condition was created using MS WORD.

We imported this file in the Telerik Radeditor for mail merge.
On exporting the file from Telerik Radeditor, the output files did not have any of the merge fileds that were created in word document.

2.Does Telerik have a feature to create the conditional merge fileds like we can do with MS word.

Thanks.

5 Answers, 1 is accepted

Sort by
0
Ianko
Telerik team
answered on 10 Feb 2015, 06:18 AM
Hello Blessy,

When it comes to MailMerge from MS Word, there is no technical approach to paste the if field and expect it to work. In the scope of the HTML, where is the data base table, which to coordinate with?

Generally, in HTML this can be called binding to data base, and the approach to build it like in MS Word is rather a custom solution. There are no built-in options to achieve that.

Recently, a new code library item was created to demonstrate the creation of a similar MailMerge functionality. You can follow it via this link - MailMerge with RadEditor. Although, if statement fields are not illustrated, you should be able to follow the example attached and further extend it up to the exact requirements.

Note that using the custom solution suggested will not enable users to paste MailMerge from MS Word directly. With this solution the data table is still not passed and in a web application there is no technique available to properly get it.

Regards,
Ianko
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Blessy Antony
Top achievements
Rank 1
answered on 10 Feb 2015, 04:43 PM
Hi Lanko,

 We tried using the control you mentioned and found that:
1. The formatting of the word document is shaken.
2. Mail merge fields, conditions etc are not preserved.

Trying to attach a document with a few mail merge fields and conditional rendering of checkboxes. Unable to do so here, let us know where to send this to you.
Try importing this document into the telerik control, edit it and then export it into word. Check the difference between both the documents.

Please let us know if the formatting and mail merge work as expected.

Thanks in advance.



0
Ianko
Telerik team
answered on 12 Feb 2015, 11:37 AM
Hello,

As I stated below, there is no approach to provide a functionality that can be supported both in HTML environment and MS Word. Both cases are different and when it comes to MailMerge, in HTML this is a custom solution which cannot be handled as in MS Word.

Regards,
Ianko
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Luis
Top achievements
Rank 1
answered on 04 Mar 2018, 12:39 AM

Hello Lanko,

Is there any newsabout conditional mail merge?

I'm trying to apply Mail Merge to a RTF document in order to generate a new document to be downloaded.

I need to process mailmerge to generate checkboxes...  This is, based on the field's value, a check box must be added checked or unchecked to the processed document.

To implement this feature I'm trying to apply MailMerge to a RTF template document which contains conditional Mail Merge fields. 

{ IF {MERGEFIELD Checkbox} = 0 "UnChecked" "Checked"}

The restult in the file is a label that reads as "Contitional text  :" grey background.

Do you have any insight about this feature?

Reqards!

 

0
Rumen
Telerik team
answered on 05 Mar 2018, 09:59 AM
Hello Luis,

RadEditor is an HTML editor and as such it can work and operated with HTML tags and plain text only. It does not offer built-in support or API for the Mail Merge functionality offered by MS Word. 

The MailMerge with RadEditor article shows how to define custom fields like #{FieldName} in the iframe content area of the control and to replace them when obtaining the contents on the server with the desired DB field values. That's the whole solution and there isn't integration and support for MS Word, Outlook and Office. 

Best regards,
Rumen
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Editor
Asked by
Blessy Antony
Top achievements
Rank 1
Answers by
Ianko
Telerik team
Blessy Antony
Top achievements
Rank 1
Luis
Top achievements
Rank 1
Rumen
Telerik team
Share this question
or