@GusGus You can clone the main document without children and then append both cover and main document to it using the destination styles:
Document main = new Document(path + "1.docx");
Document cover = new Document(path + "生产记录-横版签批(1).docx");
// Clone main document without children.
Document target = (Document)main.deepClone(false);
// Append cover and main document to target using destination styles.
target.appendDocument(cover, ImportFormatMode.USE_DESTINATION_STYLES);
target.appendDocument(main, ImportFormatMode.USE_DESTINATION_STYLES);
target.save(path + "out.docx");
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
Enables storage, such as cookies, related to analytics.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.