Page 1 of 1

Track changes for docx

PostPosted: Sat Jul 13, 2019 7:21 pm
by hanct
Hi all,

I have been looking around for a good java library that provide great features to manipulate files of microsoft words 2007 and above.
One of the feature I am looking for is library that provide API to enable/disable Track changes , and to accept/reject track changes PROGRAMMATICALLY.

Does latest version of docx4j (version 8) support that?

I

Re: Track changes for docx

PostPosted: Sat Jul 20, 2019 3:13 pm
by jason
You have full programmatic control over redline functionality at the JAXB level. You can use the Docx4j Helper Word AddIn to generate sample code.

To accept all changes in a document, see https://github.com/plutext/docx4j/blob/ ... ccept.java

The XSLT is at https://github.com/plutext/docx4j/blob/ ... anges.xslt

There are various other structures you would need to handle in the XSLT for a full solution, but w:ins and w:del are the most common. Happy to accept a pull request here, thanks.

Re: Track changes for docx

PostPosted: Mon Dec 28, 2020 5:54 am
by Vikram
Jason,

Is this still the correct procedure to accept all changes in a Word document? Or do later versions of Docx4j have this functionality implemented within the library?

Thanks.

Vikram

Re: Track changes for docx

PostPosted: Mon Dec 28, 2020 6:16 am
by jason
Hi Vikram, this is still the way to do it. cheers .. Jason