PPTX Modify Protection

PPTX Modify Protection enables you to protect the content of your PowerPoint presentation (PPTX) from unwanted editing.

Following example shows how to create modify protected PPTX file.

PPTX modify protection set with GemBox.Presentation
Screenshot of PPTX modify protection set with GemBox.Presentation
using GemBox.Presentation;

class Program
{
    static void Main()
    {
        // If using Professional version, put your serial key below.
        ComponentInfo.SetLicense("FREE-LIMITED-KEY");

        var presentation = new PresentationDocument();

        var slide = presentation.Slides.AddNew(SlideLayoutType.Custom);

        slide.Content.AddTextBox(ShapeGeometryType.Rectangle, 2, 2, 20, 2, LengthUnit.Centimeter)
            .AddParagraph()
            .AddRun("This presentation has been opened in read-only mode, no changes can be made to a slide.");

        // ModifyProtection class is supported only for PPTX file format.
        presentation.ModifyProtection.SetPassword("1234");

        presentation.Save("PPTX Modify Protection.pptx");
    }
}
Imports GemBox.Presentation

Module Program

    Sub Main()

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

        Dim presentation = New PresentationDocument

        Dim slide = presentation.Slides.AddNew(SlideLayoutType.Custom)

        slide.Content.AddTextBox(ShapeGeometryType.Rectangle, 2, 2, 20, 2, LengthUnit.Centimeter) _
            .AddParagraph() _
            .AddRun("This presentation has been opened in read-only mode, no changes can be made to a slide.")

        ' ModifyProtection class is supported only for PPTX file format.
        presentation.ModifyProtection.SetPassword("1234")

        presentation.Save("PPTX Modify Protection.pptx")
    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.