Hide header and footer from docx file using python

Hello,
I am developing script that will hide/unhide headers/footers from docx file. Is it possible to hide/unhide headers/footers only while leaving rest of the docx content untouched using aspos.words in Python.
Thanks
Snehal

@SnehalD You can simply remove headers/footers from the document. In this case the document content will be left untouched, but headers/footers will be removed. Please see our documentation to learn how to work with headers/footers using Aspose.Words:
https://docs.aspose.com/words/python-net/working-with-headers-and-footers/

Hi Alexey,

Thank you very much for your response. I am specifically looking for hiding content from header/footer to be able to unhide all once done with file processing. In this case I don’t want to loose the content from header/footer.

Please kindly let me know.

Thanks,
Snehal

@SnehalD You can mark headers/footers content as hidden, for example. If possible could you please achieve what you need in MS Word and attach the expected document here for our reference? We will check it and provide you more information.