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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Convert Word Document with images to HTML

Thread ID:





125597 Aug 26,2016 01:27 PM UTC Aug 29,2016 12:32 PM UTC WinForms 1
Tags: DocIO
Danny Lloyd
Asked On August 26, 2016 01:27 PM UTC

I am attempting to convert a word document, which contains images, to HTML.  The resulting HTML will be used as the body for sending email using System.Net.Mail.SmtpClient. 

I tried this with version 11 and DOCIO was embedding the images as data:image/png;base64.....  The images would not appear in the email, they showed as a red X.  I could save the email as HTML and view the image properly.

I upgraded to the latest version 14 release to see if I could get this working.  When I save the word document to html, I am using the save option to save it to a memory stream.  DOCIO is creating an _images folder that contains the images in the document.  The resulting email cannot show the images since they are not embedded in the email.

I am thinking that the references in the html need to use CID.  I am trying to determine if I will have to do this manually or if this is something that DOCIO can do for me.

Do you have a recommendation or sample that shows how to use DOCIO to convert a document to html and use that to produce an email with embedded images?


Ayswarya Krishna Kumar [Syncfusion]
Replied On August 29, 2016 12:32 PM UTC

Hi Danny,

Thank you for contacting Syncfusion support.

With the provided details we have determined the working scenario of your requirement. Please find the following steps.
1) Convert the Word document to HTML – using DocIO.
2) The converted HTML string will be given as EMAIL textbody content – using SmtpClient.

We have prepared the sample to meet your requirement and attached the same for your reference. In the sample we have embedded .JPEG images into the HTML file and sent the same HTML content as the mail using LinkedResource of SmtpClient. Try running the sample and let us know whether it helps?

Sample link:



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon