Thanks for your inquiry. There could be insert, delete and formatting change revisions in a Word document. Aspose.Words allows you to programmatically detect certain types of revisions. The Inline.IsInsertRevision and Inline.IsDeleteRevision properties available for the Run and Paragraph objects allow you to detect whether this object was inserted or deleted in Microsoft Word while change tracking was enabled.
You can get the formatting of track changes by using Run.Font property. Please use the Run.IsDeleteRevision and Run.IsInsertRevision to check either Run node has value true or not for these properties. If these properties has true value, please use Run.Font property to get formatting of track changes.
Please let us know if you have any more queries.
Hi Tahir Manzoor,
- "First I have this font."
I agree, I’ve also found the lack of support for formatting changes to be a debilitating problem within Aspose.Words, especially because when querying the changed runs, Aspose.Words returns the formatting information relevant to the original document, rather than the revised document. I reported this nearly a year ago on the forum (http://www.aspose.com/community/forums/497257/wrong-font-information-returned-when-there-are-tracked-formatting-changes/showthread.aspx#497257), to which I’ve just posted an update.
Nevertheless, in the case that you describe, where you just need to read the file and identify the formatting changes, there is a possible workaround, which we have used successfully: we make a copy of the Word file, and in the new file, we run “AcceptAllChanges”. Then, we compare the two documents, one run at a time, examining the formatting of the runs. In the case where there has been a formatting change, the original document will return the formatting from before the change, and the new document will return the formatting after the change. Thus, it is possible to extract the information, albeit in a rather circuitous manner.
aavechkin:thanx for your reply. But how can get formatting changes. Please, consider next example:"First I have this font."And now "First I have this font."How can I detect, that first it was list, word "have" was underlined, words "this" and "font" were bold.But now I have got only word "font" as italic, other words have got styles by default.Like this: have - changed from underline to defaultthis - changed from bold to defaultfont - changed from bold to italic.