Unlock PPTX using C++

Use Aspose.Slides for C++ to remove encryption and write protection from presentation files without Microsoft PowerPoint.

Removing Protection from a PPTX Presentation via C++

Aspose.Slides for C++ lets you remove encryption or write protection from PPTX presentations. Use LoadOptions to open an encrypted file, then use the ProtectionManager object from the Presentation class to call RemoveEncryption or RemoveWriteProtection.

Removing Password Protection from PPTX using C++

auto loadOptions = MakeObject<LoadOptions>();
loadOptions->set_Password(u"password");

auto presentation = MakeObject<Presentation>(u"encrypted-presentation.pptx", loadOptions);

presentation->get_ProtectionManager()->RemoveEncryption();
presentation->Save(u"unlocked-presentation.pptx", SaveFormat::Pptx);
presentation->Dispose();

Removing Write Protection from a PPTX Presentation using C++

auto presentation = MakeObject<Presentation>(u"write-protected-presentation.pptx");

presentation->get_ProtectionManager()->RemoveWriteProtection();
presentation->Save(u"unlocked-write-protected-presentation.pptx", SaveFormat::Pptx);
presentation->Dispose();

How to Remove a Password from PPTX via C++

Follow these steps to remove protection from a PPTX presentation.

  1. Load the PPTX file with the Presentation class and LoadOptions when a password is required.
  2. Use the ProtectionManager object to remove protection.
  3. Call RemoveEncryption for encrypted files or RemoveWriteProtection for write-protected files.
  4. Save the unlocked file with SaveFormat::Pptx.

Built with Aspose.Slides

Unlock PPTX Files Online

The free Aspose.Slides Unlock app is built with Aspose.Slides for C++, the same API as the code above. Open it and see what the API can do with your own PPTX files.

  • Runs in your browser, nothing to install.
  • See how Aspose.Slides removes protection before you write code.
  • Remove the password or write protection from your PPTX file.
  • Download the unlocked file.

Other Supported Unlocking Formats

Using C++, you can also remove protection from the following formats.