Open XML WordprocessingDocument.Open - File contains courrupted data for .doc Word document C#
Getting "File contains corrupted data" using OpenXML. Below is my code.
List<string> chunkData = new List<string>();
using (WordprocessingDocument wordDocument = WordprocessingDocument.Open("d:\\Test.doc", false))
{
var paragraphs = wordDocument.MainDocumentPart.RootElement.Descendants<Paragraph>();
foreach (var paragraph in paragraphs)
{
chunkData.Add(paragraph.InnerText);
}
}
Please suggest.