HTML JPG PDF XML PPTX
Aspose.Slides  for .NET
PPTX

Unlock PPTX Presentation in C#

Remove protection from PPTX using .NET library.

Unlock PPTX File Using C#

In order to remove protection PPTX file, we’ll use

Aspose.Slides for .NET

API which is a feature-rich, powerful and easy to use document protection API for C# platform. Open

NuGet

package manager, search for Aspose.Slides and install. You may also use the following command from the Package Manager Console.

Aspose.Slides


PM> Install-Package Aspose.Slides.NET

Unlock PPTX via C#

You need aspose.slides.dll referenced in your project to execute the following workflow.

  1. Load locked PPTX with an instance of Presentation

  2. Check protection using IProtectionManager.IsWriteProtected boolean type property

  3. Remove protection using the IProtectionManager.RemoveWriteProtection method

  4. Save result in PPTX format

System Requirements

Aspose.Slides for .NET is supported on all major operating systems. Just make sure that you have the following prerequisites.

  • Microsoft Windows or a compatible OS with .NET Framework, .NET Core, Windows Azure, Mono or Xamarin Platforms
  • Development environment like Microsoft Visual Studio
  • Aspose.Slides for .NET referenced in your project
 

Command


// load locked PPTX file
var presentation = new Slides.Presentation("locked.pptx");

// check if presentation is write protected
if (presentation.ProtectionManager.IsWriteProtected)
    // remove protection                
    presentation.ProtectionManager.RemoveWriteProtection();

// save presentation
presentation.Save("output.ppt", Aspose.Slides.Export.SaveFormat.Pptx);
 
  • About Aspose.Slides for .NET API

    Aspose.Slides API can be used to read, write, manipulate and convert Microsoft PowerPoint documents to PDF, XPS, HTML, TIFF, ODP and various other formats. One can create new files from scratch and save those in the relevant supported formats. Aspose.Slides is a standalone API for creating, parsing or manipulating presentations, slides and elements and it does not depend on any software like Microsoft or OpenOffice.

    Free App to Unlock PPTX

    Other Supported Unlocking Formats

    Using C#, one can easily remove protection / unlocking of different formats including.

    ODP (OpenDocument Presentation Format)
    PPT (Microsoft PowerPoint 97-2003)