It seems deleteTemplateBlock() and clearBlocks() only work in the document body, not in the header or footer.
Is there any other way to achieve the same functionality for header/footer?
🏷️ Limited Offer: 25% OFF 🏷️
First 100 purchases only — Special discount!
Use this coupon on checkout: PHPDXPJ_D1SC1N5T
Get it nowIt seems deleteTemplateBlock() and clearBlocks() only work in the document body, not in the header or footer.
Is there any other way to achieve the same functionality for header/footer?
Hello,
Using DOCXPath you can clone (cloneWordContent) and remove contents (removeWordContent) in the document body, headers and footers. In the example folder available in the package you can find samples about using them with headers and footers.
Regards.