Questa guida rapida descrive come accettare tutte le modifiche in Word usando Java. Include details on how to configure the IDE for development, a series of instructions and sample code to accept tracked changes in Word using Java. You will also learn the various API options to customize the output Word file when accepting revisions.
Steps to accept all tracked changes in Word using Java
- Set up the environment to use Aspose.Words for Java to accept tracked changes.
- Upload the original Word file that contains the tracked changes in memory using the Document object.
- Access the revisions collection and view the current revision count.
- Call the getRevisions().acceptAll() method on the Document object to accept all revisions.
- View the revision count again to confirm that all revisions are accepted.
- Save the resulting Word file after accepting the revisions.
These steps summarize how to accept tracked changes in Word using Java. Load the original Word file with tracked changes, access the revisions collection and view its count, and call the getRevisions() method.acceptAll() per accettare tutte le revisioni. Finally, view the revision count again and save the updated Word file without revisions.
Code to accept tracked changes in Word using Java
This code demonstrates how to accept revisions in Word using Java. To stop tracking further changes, disable the document’s change‑tracking flag after accepting the revisions. You can also view the properties of each revision, such as type, author, or date. Inoltre, puoi filtrare le revisioni in base a diversi criteri, ad esempio accettando tutte le revisioni di un determinato autore, un tipo specifico (come “elimina”), o una data particolare.
Questo articolo ti guida nell’utilizzo delle revisioni in un file Word. To remove pages from a Word file, see the article Remove pages from Word using Java.