Manage namespaces to perform XPath queries. Using (WordprocessingDocument wdDoc = WordprocessingDocument.Open(file.OpenBinaryStream(), false)) StringBuilder textBuilder = new StringBuilder()
See: public static string TextFromWord(SPFile file) To use this solution you would need reference, which is part of the OpenXML SDK. It is especially useful for anyone trying to use regular expressions to parse the contents of a Word document. This snippet of code will open a document and return its contents as text. For Microsoft Word 2007 and Microsoft Word 2010 (.docx) files you can use the Open XML SDK.