Stream stream = File.Open(@"test.docx", FileMode.Open); WordprocessingDocument wordprocessingDocument = WordprocessingDocument.Open(stream, true); // read document content string wordcontent = wordprocessingDocument.MainDocumentPart.Document.Body.InnerText; // get all fonts of the word document var fonts = wordprocessingDocument.MainDocumentPart.Document.Descendants<runfonts>().Select(c => c.Ascii.HasValue ? c.Ascii.InnerText : string.Empty).Distinct().ToList();</runfonts>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)