I have multiple preformatted Word document with placeholders e.g. $AMOUNT$, $DATE$, ... In every document I have defined the same header and footer.
I want to create an empty word document that contains the static header and footer and those two elements be injected into the other preformatted document so that after changing the document containing header and footer those changes will be merged into the preformatted documents
| Template | Document 2 | Resulting Document | Document 2 | Resulting Document 2 |
| Header | Header | Header | ||
| Body | Body | Body 1 | Body 1 | |
| Footer | Footer | Footer |
| Template | Document 3 | Resulting Document 3 |
| Header 1 | Header 1 | |
| Body 2 | Body 2 | |
| Footer 1 | Footer 1 |
I tried to load the document containing header and footer and tried to set those values to the preformated document. But I do not know how to do it, since all properties are GET only
All the Best,
Michael
Hi Manikandan,
thank you for the support and the provided example. The code works, the only modification that I had to do is the removal of the following line. What do you think about inserting this use case in the documentation, because I think this might be a common use case for working
section.PageSetup.Margins = pageSetup.Margin
Regards,
Michael Mairegger