SetWriteProtection

ProtectionManager.SetWriteProtection method

Set write protection for this presentation with specified password.

public void SetWriteProtection(string password)
ParameterTypeDescription
passwordStringThe password.

Examples

The following sample code shows you how to set a write protection to a presentation.

[C#]
using (Presentation presentation = new Presentation("pres.pptx"))
{
    presentation.ProtectionManager.SetWriteProtection("123123");
    presentation.Save("write-protected-pres.pptx", SaveFormat.Pptx);
}

See Also