DocumentUnprotect Method (String)
Removes protection from the document if a correct password is specified.

Namespace: Aspose.Words
Assembly: Aspose.Words (in Aspose.Words.dll) Version: 19.9
Syntax
public bool Unprotect(
	string password
)

Parameters

password
Type: SystemString
The password to unprotect the document with.

Return Value

Type: Boolean
True if a correct password was specified and the document was unprotected.
Remarks

This method unprotects the document only if a correct password is specified.

Note that document protection is different from write protection. Write protection is specified using the WriteProtection.

Examples
Shows how to unprotect a document using a password.
[C#]

doc.Unprotect("password");
See Also