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

Display HTML in a WTextFormField in a Syncfusion.DocIO.DLS.WordDocument

Hi,

We have some text stored in the database as HTML. This markup includes paragraphs, bullet points etc 

What we would like to do is display this in a .doc so that the text retains its formatting i.e. the HTML is displayed in the .doc as it would appear in a Browser.

I have tried setting the FieldType property of the WTextFormField to "FieldType.FieldHTMLActiveX" but this did not work.

I should mention that we have other MergeFields in the same .doc that are just going to display plain text so we cannot just display the whole thing as html.

Thanks for your help,

Chris.


3 Replies

SK Sathish K Syncfusion Team June 6, 2014 12:59 PM UTC

Hi Chris,

 

Thank you for your interest in Syncfusion Products.

 

DocIO provides support to perform mail merge only with simple text and image. In order to perform mail merge with Html text, kindly make use of MergeFieldEventHandler to replace merged value (Html text) of a merge field with its equivalent formatted content using InsertHTML method. We have prepared a sample to illustrate the same. Please do find the sample from below link and let us know if this helps you.

 

Sample link:

http://www.syncfusion.com/downloads/support/directtrac/125892/Sample-107885131.zip

 

Please let us know if you have any other questions.

 

Regards,

Sathish



CW Chris Woodward June 10, 2014 10:41 AM UTC

Hi Sathish,
Thanks for your help.
We have got it working now.
Best wishes,
Chris.


SK Sathish K Syncfusion Team June 11, 2014 05:34 AM UTC

Hi Chris,

 

Thank you for your update.

 

We are happy to hear that the provided solution resolved your issue. Please let us know if you need any further assistance. We will be happy to assist you as always.

 

Regards,

Sathish


Loader.
Live Chat Icon For mobile
Up arrow icon