Unprotect word document when convert docx to doc by aspose

I protect docx file by bellow code and everything is fine:

var password = "12345";
wordDocument.Protect(Aspose.Words.ProtectionType.ReadOnly, password);
wordDocument.Save(filePath);

When I convert generated file to doc (by Aspose), generated doc file is unprotected by Restrict Editing and Stop Protection without ask password! (It is shown in attachment image)

Read only file and converted doc file is attached

Hi Freydoon,

Thanks for your inquiry. We have tested the scenario using latest version of Aspose.Words for .NET 16.2.0 and have not found the shared issue. Please use Aspose.Words for .NET 16.2.0 and let us know if you have any more quires.

Hi
Thanks for the prompt reply.
I test with new version of Aspose.Words and see this problem again.
Scenario :

  • Make read only a docx file and save it.
  • Convert docx file(that generated in first step) to doc. now Stop Protection don’t ask password and upprotect the file.

Hi Freydoon,

Thanks for your inquiry. We have tested the scenario using following code example and have noticed that “Stop Protection” do not ask password.

Please note that Aspose.Words mimics the same behavior as MS Word does. If you perform the same scenario using MS Word, you will get the same output for Doc file format.

var password = "12345";
Document wordDocument = new Document();
wordDocument.Protect(Aspose.Words.ProtectionType.ReadOnly, password);
wordDocument.Save(MyDir + "Out.docx");
Document doc = new Document(MyDir + "Out.docx");
doc.Save(MyDir + "Out.doc");

Hi
Thanks for reply. You are right, MS Word gives this output too.