We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Extract all track changes from a document (including formatting)

Hello,


Is it possible to extract all track changes from a document? I know how to extract inserted/deleted paragraphs/runs, but how to extract formatting changes? For example if texts font was changed to Bold, red, etc.

Is it possible? Thanks.

Hi Alex,

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,


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 default
this - changed from bold to default
font - changed from bold to italic.

Is that possible?
And what if I did not insert or delete any text, but just changed formatting - in that case it is not deleted/inserted run? Can I detect that type of change?
Thank you for your help.
Hi Alex,

Thanks for your inquiry. Unfortunately, Aspose.Words does not support the requested feature at the moment. If you do the same scenario by using MS Word, MS Word shows the formatting changes as shown in attached document/image. I have logged this feature request as WORDSNET-8968 in our issue tracking system. You will be notified via this forum thread once this feature is available.

Moreover, when you modify a document using Aspose.Words, these modifications are done to the document directly and will not appear as tracked changes. We had already logged this feature request as WORDSNET-754 in our issue tracking system. You will be notified via this forum thread once this feature is available.

We apologize for your inconvenience.

Hi Tahir,


I don’t need to modify document, just extract changes.
However, thank you very much.

Best regards.

Hello,

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.


Hi Avi,

Thanks for your inquiry. Regarding formatting issue please check my reply here:
https://forum.aspose.com/t/49353

Moreover, currently only Insert and Delete revisions are made available in the public API. Unfortunately, Aspose.Words does not support the formatting changes at the moment. I have already logged this feature request as WORDSNET-8968 in our issue tracking system. You will be notified via this forum thread once this feature is available.

We apologize for your inconvenience.

Hi Alex,
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 default
this - changed from bold to default
font - changed from bold to italic.
In MS Word format change is a simple concatenated string representation of values. Please check the attached image in this post:
https://forum.aspose.com/t/50433

Do you want the same formatting change as MS Word does? It would be great if you please share some more detail about your requirement. I will really appreciate your cooperation for this.

The issues you have found earlier (filed as WORDSNET-754) have been fixed in this .NET update and this Java update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.
(18)