title: Convert html to word using c#
body: <p>I am using Microsoft.Office.Interop.Word to convert html to word.I am creating html file on local machine then converting it to word file.But word file is not showing correct formatting. It is just showing images. I have referred stackoverflow questions.But I found no luck.
  My sample html file is as shown below:-</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!doctype html&gt;
  &lt;html xmlns:o='urn:schemas-microsoft-com:office:office' xmlns:w='urn:schemas-microsoft-com:office:word' xmlns='http://www.w3.org/TR/REC-html40'&gt;
  
  &lt;head&gt;
    &lt;title="Device Information" /&gt;
    &lt;style&gt;
      table.main {
        width: 700px;
        height: 450px;
        background: radial-gradient(#1367AB 0%, #154075 60%);
      }
      td.firsttablerow1 {
        width: 190px;
      }
      td.firsttablerow2 {
        width: auto;
        color: white;
      }
      tr.image1 {
        margin: "15px,20px,30px,40px";
        align-items: stretch;
        height: 100px;
      }
      tr.image2 {
        margin: "0px,20px,30px,40px";
        align-items: stretch;
      }
      tr.text1 {
        color: #DDE9F2;
        align-items: flex-end;
        font-size: 9;
      }
    &lt;/style&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
    &lt;table align="center" class="main"&gt;
      &lt;tr&gt;
        &lt;td class="firsttablerow1"&gt;
          &lt;table&gt;
            &lt;tr class="image1"&gt;
              &lt;td&gt;
                &lt;img src='C:\Jellyfish.jpg' width='200' height='90'&gt;
              &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr class="image2"&gt;
              &lt;td&gt;
                &lt;img src='C:\Desert.jpg' width='150' height='90'&gt;
              &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr class="text1"&gt;
              &lt;td&gt;"abc"&lt;/td&gt;
            &lt;/tr&gt;
          &lt;/table&gt;
        &lt;/td&gt;
        &lt;td class="firsttablerow2"&gt;"xyz"&lt;/td&gt;
      &lt;/tr&gt;
    &lt;/table&gt;
  
  &lt;/body&gt;
  
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>My C# code to convert html to word is as shown below.</p>
  
  <pre><code>MSWord.Application word = new MSWord.Application { Visible = false };
          word.Documents.Open("htmlfilename", Format: WdOpenFormat.wdOpenFormatWebPages);
          MSWord.Document doc = word.Documents[@"htmlfilename"];
          doc.SaveAs2(@"wordFileName", WdSaveFormat.wdFormatDocument);
          doc.Close();
          doc = null;
          word.Quit();
          word = null;
  </code></pre>
  
  <p>Edit:-After investigating further ,I found that word is getting created .But It is unable to change background by using radial-gradient .Is there any other way to add radial background?</p>