Open XML Formats and file name extensions - Office Support[
^]
OpenXML will not work with doc format but with docx format. So if you are trying with doc format then first change it extension using below method
]public void ConvertDocToDocx(string path)
{
Application word = new Application();
if (path.ToLower().EndsWith(".doc"))
{
var sourceFile = new FileInfo(path);
var document = word.Documents.Open(sourceFile.FullName);
string newFileName = sourceFile.FullName.Replace(".doc", ".docx");
document.SaveAs2(newFileName, WdSaveFormat.wdFormatXMLDocument,
CompatibilityMode: WdCompatibilityMode.wdWord2010);
word.ActiveDocument.Close();
word.Quit();
File.Delete(path);
}
}
Now OpenXML will parse your data along with some JUNK Numbers which we cannot get rid of. But we can do verification that our data exists.