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.

Screenshot
PPTX Modify Protection Screenshot

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

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");

        PresentationDocument presentation = new PresentationDocument();

        Slide 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.
        ModifyProtection protection = presentation.ModifyProtection;
        protection.SetPassword("1234");

        presentation.Save("PPTX Modify Protection.pptx");
    }
}
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 presentation As PresentationDocument = New PresentationDocument

        Dim slide As 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.
        Dim protection As ModifyProtection = presentation.ModifyProtection
        protection.SetPassword("1234")

        presentation.Save("PPTX Modify Protection.pptx")

    End Sub

End Module