Hi, i am trying for my company to automatize some modifying docx files.
I have a template file that i am modifying in my script. This file has differents headers/footers for the first page and the other pages of the file.
But when i load the file it seems that the header and footer of the first page is udplicated to all the other pages.
I know there is "section.PageSetup.DifferentFirstPageHeaderFooter = True" but i don't know how to make it work.
It seems that just doing this does the problem, so i guess it's when loading the word document.
doc = Document()
doc.LoadFromFile(word_template_path)
doc.SaveToFile(final_rapport_path, FileFormat.Docx2016)
doc.Close()
Do you have any ideas on how to deal with my problem ? I thought about splitting my document in two parts but if there is any more efficient and easier way i'm open to ideas !
Thank you