PPT
PPTX
ODP
POT
PPSX
ODP
Lock or Password Protect ODP using C++
Use Aspose.Slides for C++ to encrypt presentations and set write protection without Microsoft PowerPoint.
Protecting a ODP Presentation via C++
Aspose.Slides for C++ lets you protect ODP presentations from opening or modification. Use the ProtectionManager object from the Presentation class to encrypt a file with Encrypt or restrict editing with SetWriteProtection.
Encrypting a ODP Presentation using C++
auto presentation = MakeObject<Presentation>(u"presentation.odp");
presentation->get_ProtectionManager()->Encrypt(u"password");
presentation->Save(u"encrypted-presentation.odp", SaveFormat::Odp);
presentation->Dispose();
Setting Write Protection to a ODP Presentation using C++
auto presentation = MakeObject<Presentation>(u"presentation.odp");
presentation->get_ProtectionManager()->SetWriteProtection(u"password");
presentation->Save(u"write-protected-presentation.odp", SaveFormat::Odp);
presentation->Dispose();
How to Password Protect ODP via C++
These are the steps to protect ODP files.
Load the ODP file with the
Presentationclass.Protect the presentation with the
ProtectionManagerobject.Use
Encryptfor password protection orSetWriteProtectionfor write protection.Save the protected file with
SaveFormat::Odp.