While applying protection level (read only option)- it allows comments to be added

Hi,

I am setting the protection type of a document to read-only, but it lets me apply comments also; in this way both the options (ProtectionType.AllowOnlyComments and ProtectionType.ReadOnly) provides same results.

please suggest how could i set the protection level to read only.

regards
Vivek Bahl

I have tested setting document protection with the following line:

doc.Protect(ProtectionType.ReadOnly);

and the resulting document didn't allowed me to set any comments.

If you still have problems please attach you document before setting protection and the code snippet that you are processing the document with. It will help us to reproduce the bug if it exists.

Best regards,

Hi,

I have attached a normal document. I have tested and found that by using the code doc.Protect(ProtectionType.ReadOnly); still the document allows comments to be inserted when i open it in MS Word 2003. Also i am using Aspose.Words 3.7.0.0 version

regards
Vivek bahl

Thanks, I have reproduced the problem. There is indeed an issue with setting the DocumentProtection to ReadOnly. I will check if we can fix it soon and let you know.

Best regards,

I have logged this problem to our defect base as issue #1245. We will probably fix it in the next release which will be published in a few weeks. Sorry for inconvenience.

Best regards,

The issues you have found earlier (filed as 1245) have been fixed in this update.