Aspose.Slides.Examples.CSharp.VBA.RemoveVBAMacros.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_VBA();

            // ExStart:RemoveVBAMacros
            // Instantiate Presentation
            using (Presentation presentation = new Presentation(dataDir + "VBA.pptm"))
            {
                // Access the Vba module and remove 
                presentation.VbaProject.Modules.Remove(presentation.VbaProject.Modules[0]);

                // ExEnd:RemoveVBAMacros
                // Save Presentation
                presentation.Save(dataDir + "RemovedVBAMacros_out.pptm", SaveFormat.Pptm);
            }
        }
    }
RemoveVBAMacros