We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

RTF Word Protected Section Issue

I am using Aspose.Words version 16.1 to simply load an RTF document and update fields and then get it back as RTF. The document has protected sections where part of the document is protected from editing. Microsoft Word has thrown a wrinkle in to the protected section logic and it is not part of the RTF specification. For some reason they are not adding a 1 to the \sectunlocked command. Without the 1 it messes up the document when opened in Microsoft Word, with the 1 it renders fine. Aspose Words doesn’t seem to care about it but does strip it from the document when it saves as RTF. Google searches on this have turned up nothing and the 1 appears to work in Word 2010, 2013, and 2016 so it may have been in there a while and we didn’t run in to it until now. I have included two RTF documents in a zip file with a before and after document. It would be great if Aspose.Words would not strip any extra stuff like numbers after the \sectunlocked command for documents that were loaded.


Hi Scott,

Thanks for your inquiry. We have tested the scenario using latest version of Aspose.Words for Java 17.2.0 and noticed that the output looks fine in MS Word 2016. Please upgrade to the latest version of Aspose.Words for Java 17.2.0. We have attached the output Rtf with this post for your kind reference.

If you still face problem, please share your expected output RTF that contains the \sectunlocked with number 1. Please also share the MS Word version that you are using. We will investigate the issue on our side and provide you more information.