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 set with GemBox.Presentation
Screenshot of PPTX encryption set with GemBox.Presentation
Upload your file (Drag file here)
using GemBox.Presentation;

class Program
    static void Main()
        // If using Professional version, put your serial key below.

        string inputPassword = "%InputPassword%";
        string outputPassword = "%OutputPassword%";

        var presentation = PresentationDocument.Load("%InputFileName%", new PptxLoadOptions() { Password = inputPassword });
        presentation.Save("PPTX Encryption.pptx", new PptxSaveOptions() { Password = outputPassword });
Imports GemBox.Presentation

Module Program

    Sub Main()

        ' If using Professional version, put your serial key below.

        Dim inputPassword As String = "%InputPassword%"
        Dim outputPassword As String = "%OutputPassword%"

        Dim presentation = PresentationDocument.Load("%InputFileName%", New PptxLoadOptions With {.Password = inputPassword})
        presentation.Save("PPTX Encryption.pptx", New PptxSaveOptions With {.Password = outputPassword})
    End Sub
End Module

Want more?

Next example GitHub

Check the next example or select an example from the menu. You can also download our examples from the GitHub.

Like it?

Download Buy

If you want to try the GemBox.Presentation yourself, you can download the free version. It delivers the same performance and set of features as the professional version, but with some operations limited. To remove the limitation, you need to purchase a license.