Encrypt

ProtectionManager.Encrypt method

Encrypts Presentation with specified password.

public void Encrypt(string encryptionPassword)
ParameterTypeDescription
encryptionPasswordStringThe password.

Examples

The following sample code shows you how to encrypt a PowerPoint Presentation.

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

See Also