Aspose.Slides.Examples.CSharp.Presentations.Saving.SaveProperties.Run C# (CSharp) Method

Run() public static method

public static Run ( ) : void
return void
        public static void Run()
        {
            // The path to the documents directory.
            string dataDir = RunExamples.GetDataDir_PresentationSaving();

            // Instantiate a Presentation object that represents a PPT file
            Presentation presentation = new Presentation();

            //....do some work here.....

            // Setting access to document properties in password protected mode
            presentation.ProtectionManager.EncryptDocumentProperties = false;

            // Setting Password
            presentation.ProtectionManager.Encrypt("pass");

            // Save your presentation to a file
            presentation.Save(dataDir + "Password Protected Presentation_out.pptx", Aspose.Slides.Export.SaveFormat.Pptx);
        }
    }
SaveProperties