title: Reading .Doc File using DocumentFormat.OpenXml dll
body: <p>When I am trying to read .doc file using DocumentFormat.OpenXml dll its giving error as "File contains corrupted data."</p>
  
  <p>This dll is reading .docx file properly.</p>
  
  <p>Can DocumentFormat.OpenXml dll help in reading .doc file?</p>
  
  <pre><code>string path = @"D:\Data\Test.doc";
  string searchKeyWord = @"java";
  
  private bool SearchWordIsMatched(string path, string searchKeyWord)
  {
      try
      {
         using (WordprocessingDocument wordDoc = WordprocessingDocument.Open(path, true))
         {
             var text = wordDoc.MainDocumentPart.Document.InnerText;
             if (text.Contains(searchKeyWord))
                 return true;
             else
                 return false;
         }
       }
       catch (Exception ex)
       {
           throw ex;
       }
  }
  </code></pre>