Dear ASPOSE Java Words Team,
I was trying to append one Document to another, but unfortunately a NullPointerException were thrown.
Please see below code and attached files.
I am appreciate if you can notice me, if it’s a bug or caused by other reasons ASAP.
public static void main(String[] args) {
try {
Document document1 = new Document("...\\doc1.docx");
Document document2 = new Document("...\\doc2.docx");
document1.appendDocument(document2, ImportFormatMode.KEEP_DIFFERENT_STYLES);
document1.save("result.docx", SaveFormat.DOCX);
} catch (Exception e) {
e.printStackTrace();
}
}
docs.zip (86.9 KB)