SetWriteProtection

Méthode ProtectionManager.SetWriteProtection

Définir une protection en écriture pour cette présentation avec un mot de passe spécifié.

public void SetWriteProtection(string password)
ParamètreTypeDescription
passwordStringLe mot de passe.

Exemples

Le code d’exemple suivant vous montre comment définir une protection en écriture pour une présentation.

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

Voir aussi