// For complete examples and data files, please go to https://github.com/groupdocs-assembly/GroupDocs.Assembly-for-Java
String srcDocument = "/Word Templates/Update field.docx";
String docReport = "/Word Reports/Update field_report.docx";
try {
Manager manager = new DataStorage().getManagers().iterator().next();
DocumentAssembler assembler = new DocumentAssembler();
assembler.setOptions(DocumentAssemblyOptions.UPDATE_FIELDS_AND_FORMULAS);
assembler.assembleDocument(CommonUtilities.getTestDataPath(srcDocument),
CommonUtilities.getTestOutPath(docReport), new DataStorage(), null);
} catch (Exception exp) {
System.out.println("Exception: " + exp.getMessage());
}