Word document read only, should not be able to delete

Hi Aspose,

I am trying to make a word document read only, using the following code.
But it is not changing to read only mode.

Aspose.Words.Document doc = new Aspose.Words.Document(Test + “.docx”);
doc.Protect(Aspose.Words.ProtectionType.ReadOnly);

Please find the attached test image where we see the properties as ‘allow’, i would like to make all of them ‘Deny’ and make read only.

Final goal is to not allow to delete the document.

Can you please let me know how to proceed with this using aspose.

Thanks,
SharathTest File.png (36.5 KB)

@Sharath_kavayah

Thanks for your inquiry. With Aspose.Words, you can perform document processing tasks. The code that you are using generates the read only document. It means that user cannot modify the document by opening it in MS Word. Aspose.Words does not set permission to a document for users because this information is not stored in the document.