GemBox.Presentation is a .NET component that enables you to read, write, edit, convert, and print presentation files from your .NET applications using one simple API.

PPTX Encryption in C# and VB.NET

PPTX encryption enables you to securely protect the content of your PowerPoint presentation (PPTX) from unwanted viewers.

Following example shows how to load encrypted PPTX file and how to save presentation as encrypted PPTX file.

Input and output password should be specified in the appropriate text box. If password is empty, file won't be decrypted / encrypted.

Screenshot
PPTX Encryption Screenshot

See the full code below, use Run Example to execute.

Upload your file(Drag files here)

Download a sample file

using System.IO;
using GemBox.Presentation;

class Sample
{
    [STAThread]
    static void Main(string[] args)
    {
        // If using Professional version, put your serial key below.
        ComponentInfo.SetLicense("FREE-LIMITED-KEY");

        string inputPassword = "inpass";
        string outputPassword = "outpass";

        var presentation = PresentationDocument.Load("PptxEncryption.pptx", new PptxLoadOptions() { Password = inputPassword });

        presentation.Save("PPTX Encryption.pptx", new PptxSaveOptions() { Password = outputPassword });
    }
}
Imports System.IO
Imports GemBox.Presentation

Module Samples

    Sub Main()

        ' If using Professional version, put your serial key below.
        ComponentInfo.SetLicense("FREE-LIMITED-KEY")

        Dim inputPassword As String = "inpass"
        Dim outputPassword As String = "outpass"

        Dim presentation = PresentationDocument.Load("PptxEncryption.pptx", New PptxLoadOptions With {.Password = inputPassword})
        presentation.Save("PPTX Encryption.pptx", New PptxSaveOptions With {.Password = outputPassword})

    End Sub

End Module

Check next sample.