Lock Header and Footer of document

I have implemented the header and footer lock using startEditableRange and EndEditableRange features. But using this feature, i’m getting yellow highlighting and open bracket in editable area after saved the document.

Is there a way to permanently remove highlighting along with open bracket
from editable areas within a protected word document

Please refer the attached document and help me as soon as possible

headerfooterlock.zip (10.0 KB)

Thanks & Regards,
Shyamala B


You can disable the “yellowish background” in MS Word. Open the output document in MS Word, under the Review tab, click “Restrict Editing”. Untick the " Highlight the regions I can edit" to disable highlighted regions. Please check the attached image for detail.

Please note that this is MS Word (Application) level setting and does not store in the document. Therefore it cannot be controlled by Aspose.Words. This is completely controlled by the MS Word.


Thanks for your above information !!

Please help me to lock the header & footer section as “non-editable” in document without using startEditableRange & endEditableRange method.


You need to use startEditableRange and endEditableRange methods to get your desired output. Could you please ZIP and attach your expected output document? We will then provide you more information about your query.