I want to Accept all the track changes from word document. I have written following codes to do so.(I am using PowerTools from codeplex.)
using (WordprocessingDocument wordDoc = WordprocessingDocument.Open(filePath, true))
{
OpenXmlPowerTools.RevisionAccepter.AcceptRevisions(wordDoc);
}
But above code is not working in some of the document. It shows System.Exception: Internal error 20, found element exception in some of the document.
So is there any issue with my word document? If yes then what should I look into document? In short I want to know that what is wrong with my document so that I can correct my document to run above code.
Another thing is that I am able to accept tracking changes in Word 2013/2010/2007 itself!!
Any help would be highly appreciated,
I have asked same question on https://powertools.codeplex.com/discussions and they have updated RevisionAccepter.cs file to get this resolved. Thread from Power Tools Discussion