PPTX Encryption
The following example shows how to use GemBox.Presentation to load an encrypted PPTX file and how to save a presentation as an encrypted PPTX file.
using GemBox.Presentation;
class Program
{
static void Main()
{
// If using the Professional version, put your serial key below.
ComponentInfo.SetLicense("FREE-LIMITED-KEY");
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 the Professional version, put your serial key below.
ComponentInfo.SetLicense("FREE-LIMITED-KEY")
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