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.

PPTX Encryption Screenshot

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

Upload your file(Drag files here)

Download an input file

using System.IO;
using GemBox.Presentation;

class Sample
    static void Main(string[] args)
        // If using Professional version, put your serial key below.

        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.

        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