We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Is the Document Editor capable of inserting/removing mail merge fields?

Hi!

I just stumbled across this thread

https://www.syncfusion.com/forums/138504/server-side-helper-library-word-documents-to-sfdt-format

where one of your employees stated the Document Editor (will have) has mail merge support. Is this implemented yet? If yes there is no documentation about that


Thanks in advance

Paul

5 Replies

PK Prakash Kumar D Syncfusion Team November 1, 2018 11:59 AM UTC

Hi Paul, 
 
Thank you for contacting Syncfusion support. 
 
Currently Document Editor doesn’t support Mail Merge. The Mail Merge support will be included in our 2019 volume 2 release (17.2) which will be rolled out at the end of June 2019 tentatively. 
 
However, you can achieve mail merge with the help of DocIO (a server library) through a web service. So kindly share your requirement on this to provide you the prompt solution at the earliest. 
 
Regards 
Prakash Kumar 



FI Faisal Iqbal replied to Prakash Kumar D October 8, 2019 04:25 PM UTC

Hi Paul, 
 
Thank you for contacting Syncfusion support. 
 
Currently Document Editor doesn’t support Mail Merge. The Mail Merge support will be included in our 2019 volume 2 release (17.2) which will be rolled out at the end of June 2019 tentatively. 
 
However, you can achieve mail merge with the help of DocIO (a server library) through a web service. So kindly share your requirement on this to provide you the prompt solution at the earliest. 
 
Regards 
Prakash Kumar 


Hi,

What I need to do to provide ability to insert mail merge fileds/tables in Syncfusion template editor.


Thanks & Best Regards,

Faisal Iqbal
Senior Software Engineer
Constellation HomeBuilder Systems
Email: fiqbal@constellationhb.com
Web: www.constellationhb.com

 


SM Suriya Murugan Syncfusion Team October 9, 2019 11:42 AM UTC

Hi Faisal, 
 
To perform mail merge, in DocumentEditor, we don’t have built-in mail merge functionality. Due to unexpected changes in our release plan, Mail Merge feature will not available. We will implement this feature in any of our upcoming release. You can track the status of this feature through below feedback link: 
Once, the feature is considered for implementation, we will move the scheduled status of above feedback link with release version. 
 
You can perform Mail-merge in server side by using Syncfusion.DocIO library.    
  
You can insert field in document editor using insertField method in editor module.    
    
container.documentEditor.editor.insertField('MERGEFIELD '+text+' \\* MERGEFORMAT', '{{'+text+'}}');   
    
First parameter refer: fieldcode and second parameter is display text.      
       
You can find more detail about mail merge functionality from below KB link.   
    
 
Regards, 
Suriya M. 



RE René replied to Suriya Murugan January 29, 2022 07:59 AM UTC

could urgently need help


this my script


documenteditor = document.getElementById('container').ej2_instances[0];

  documenteditor.editor.insertField('MERGEFIELD ' + fieldName + ' \\* MERGEFORMAT');

but the script crashes upon inserting the mergefield


thanks a lot



SM Suriya Murugan Syncfusion Team January 31, 2022 06:51 AM UTC

Hi Rene, 
  
Please find the KB link for mail merge sample in MVC:

https://www.syncfusion.com/kb/10293/how-to-perform-mail-merge-in-asp-net-mvc 
  
Code snippet: 
If you were using document editor container, set document editor like below: 
var documenteditor = document.getElementById("container").ej2_instances[0].documentEditor; 
Else set document editor like below: 
var documenteditor = document.getElementById("container").ej2_instances[0]; 

//Send field name in parameter 
documenteditor.editor.insertField(fieldCode, '«' + fieldName + '»'); 
 

Please share the screenshot of console error if you faced anything. 

Please let us know if you still facing issue. 

Regards, 
Suriya M. 


Loader.
Live Chat Icon For mobile
Up arrow icon