I am trying to validate a 2013 Word document. The document is fully editable in Word 2013, "Check for Issues / Inspect Document" and "Check for Issues / Check Compatibility" do not report any problems.
However, while opening the document using OpenXML, I am getting error on the line with WordprocessingDocument.Open. The error is:
DocumentFormat.OpenXml.Packaging.OpenXmlPackageException: Invalid Hyperlink: Malformed URI is embedded as a hyperlink in the document.
Every sample about validation I have found goes like this:
What am I doing wrong? Is there another way to do it?using (WordprocessingDocument doc = WordprocessingDocument.Open(filepath, true)) { OpenXmlValidator validator = new OpenXmlValidator(); ...