replace footer lines of a word file

0
Hi, for a project I would like to replace the footer of a docx. file (document A) with another docx. file (document B). The exact use case is as follows. I have a form that is created in a Mendix app and downloaded as a Word file. Each branch that downloads this form should extend it with its own footer. So the idea was to upload a word file for each branch that contains the footer of the branch (including logo, CEOs, account details etc...) and when downloading the form copy the footer from the corresponding word file and paste it into the form. Is this possible? If so how?
asked
3 answers
0

My Word Template Demo Project also has the option to add generic footers. These footers are plain text with some optional page numbering. Perhaps you are already using this. Accessing an actual footer and changing it with dynamic content is possible, but isn't as easy as it seems. You would need to use the Apache POI library (which I am also using in the Word Template demo project) to allow for more complex content in the footer.

 

Perhaps you could try to target the footer in the same way as other content is added in my template project, so with actual 1 by 1 tables in it?

answered
0

 

Hi Ivo, your response to my forum activities will soon force me to give you an award, thanks for that :-)

I have already played around with your footer options. Unfortunately the ones I want to include are a bit more complex.
Using your suggestion, do you think it would be possible to create a tabular footer in the form of pinned screenshot?


answered
0

Hi Marc,

 

Currently the replace logic of the Word Template project only works for the body / pages of the Word document, not for footers nor headers. For your solution to work this needs to be extended to the footer. 

 

Can you create this footer format you need inside the body of the page with my Word Template project now?

 

answered