Overlaying Word documents possible?

I am looking for a way to overlay one Word document over another Word document:

  • Document 1 has one page with only a header and footer.
  • Document 2 has multiple pages, all of them with no footer and no header.

Now I want to merge these two documents so that on every page of document 2, there is the header and footer of document 1.

I’m aware of https://docs.aspose.com/words/net/insert-and-append-documents/ and https://reference.aspose.com/words/net/aspose.words/document/appenddocument/

I think what I want to acchieve is something similar to the Stamp class of Aspose.Pdf.Kit.

Question:

Is it possible to achieve this goal?

Thanks
Uwe

Hi

Thanks for your request. I think in this case you can try using the following code:

Document dstDoc = new Document("dstDoc.doc");
Document srcDoc = new Document("srcDoc.doc");
dstDoc.AppendDocument(srcDoc, ImportFormatMode.UseDestinationStyles);
dstDoc.Save("out.doc");

Test documents are attached.
Best regards,

Thanks for your quick reply, I will try this.

Best regards
Uwe