title: Convert .doc to .docx using C#
body: <p>I convert PDF file to the word file using PDFFocus.net dll. But for my system I want .docx file. I tried different ways. There some libraries available. But those are not free. This is my pdf to doc convert code.</p>
  
  <pre><code>    Using System;
      Using System.Collections.Generic;
      Using System.Linq;
      Using System.Text;
      Using System.Threading.Tasks;
      Using iTextSharp.text;
      Using iTextSharp.text.pdf;
  
      namespace ConsoleApplication
      {
            class Program
            {
                 static void main(String[] args)
                 {
                      SautinSoft.PdfFocus f=new SautinSoft.PdfFocus();
                      f.OpenPdf(@"E:\input.pdf");
  
                           t.ToWord(@"E:\input.doc");
                  }
            }
      }
  </code></pre>
  
  <p>This work successfully. 
  Then I tried with below code to convert .doc to .docx. But it gives me error.</p>
  
  <pre><code>//Open a Document.
  Document doc=new Document("input.doc");
  //Save Document.
  doc.save("output.docx");
  </code></pre>
  
  <p>Can anyone help me please.</p>