title: How to Extract Word document text from byte array?
body: <p>I am trying to get text of a Word or Excel file.However i have just access to the array of binary of this word file and i am not able to get the path of the file
  so is it possible to convert binary array of Word file to string ?
  i tried this code but it could not help me cause i could not get the path of the file</p>
  
  <pre><code>        StringBuilder text = new StringBuilder();
          Microsoft.Office.Interop.Word.Application word = new Microsoft.Office.Interop.Word.Application();
          object miss = System.Reflection.Missing.Value;
          object path = filePath;
          object readOnly = true;
          Microsoft.Office.Interop.Word.Document docs = word.Documents.Open(ref path, ref miss, ref readOnly, ref miss, ref miss, ref miss, ref miss, ref miss, ref miss, ref miss, ref miss, ref miss, ref miss, ref miss, ref miss, ref miss);
  
          for (int i = 0; i &lt; docs.Paragraphs.Count; i++)
          {
              text.Append(" \r\n " + docs.Paragraphs[i + 1].Range.Text.ToString());
          }
  
          return text.ToString();
  </code></pre>