If you encounter this exception while parsing a Word document, then the only thing I can say to you is congrats! You have tried probably some of the fixer classes like this, but they didn’t help you…

What helped me was this tool. I know it has nothing to do with code, so if you want to address the problem in your code I only can give you one hint: Try to push all links into the Uri Class and if it fails you probably have found the error.

In case you didn’t spot the error and it is enough that you fix it in Word then continue reading.
Like I already wrote in the previous paragraph of this article there is software which shows all links in your word documents (ablebits – word: links checker). Even though this plugin told me that everything is alright (which was true for word for which it was created, but not for the Office SDK) I had an error while parsing. What next? I used it to iterate over all the links and check them manually. It sounds harder then it actually was because it displayed them in a pretty easy to read list (even the links almost hidden in the doc are easy to spot then).
Doc with Link Checker
Do you see the mistake made? No? It’s really simple: The URI class can’t parse mails with quotation marks. So edit this out and the Office SDK will be happy.
More info on valid URIs: google it!

Hope I helped a bit 🙂


My error:
word_text_content

link_checker

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.