PPT PPTX ODP POT PPSX
Aspose.Slides  for C++
PPT

Lock or Password Protect PPT using C++

Use Aspose.Slides for C++ to encrypt presentations and set write protection without Microsoft PowerPoint.

Protecting a PPT Presentation via C++

Aspose.Slides for C++ lets you protect PPT 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 PPT Presentation using C++

auto presentation = MakeObject<Presentation>(u"presentation.ppt");

presentation->get_ProtectionManager()->Encrypt(u"password");
presentation->Save(u"encrypted-presentation.ppt", SaveFormat::Ppt);
presentation->Dispose();

Setting Write Protection to a PPT Presentation using C++

auto presentation = MakeObject<Presentation>(u"presentation.ppt");

presentation->get_ProtectionManager()->SetWriteProtection(u"password");
presentation->Save(u"write-protected-presentation.ppt", SaveFormat::Ppt);
presentation->Dispose();

How to Password Protect PPT via C++

These are the steps to protect PPT files.

  1. Load the PPT file with the Presentation class.

  2. Protect the presentation with the ProtectionManager object.

  3. Use Encrypt for password protection or SetWriteProtection for write protection.

  4. Save the protected file with SaveFormat::Ppt.

Other Supported Protect Formats

You can also protect the following formats with C++.