Setting Background Color of Master Slide

VSTO Slides

PowerPoint.Presentation presentation =
                Globals.ThisAddIn.Application.Presentations.Open("Setting Background Color of Master Slide.ppt", Office.MsoTriState.msoFalse, Office.MsoTriState.msoFalse, Office.MsoTriState.msoTrue);
            presentation.SlideMaster.Background.Fill.ForeColor.RGB = -654262273;

Aspose Slides

 //Instantiate the Presentation class that represents the presentation file
           
            using (PresentationEx pres = new PresentationEx())
            {

                //Set the background color of the Master ISlide to Forest Green
                
                pres.Masters[0].Background.Type = BackgroundTypeEx.OwnBackground;
                pres.Masters[0].Background.FillFormat.FillType = FillTypeEx.Solid;
                pres.Masters[0].Background.FillFormat.SolidFillColor.Color = Color.ForestGreen;

                //Write the presentation to disk
                pres.Save("Setting Background Color of Master Slide.pptx", SaveFormat.Pptx);

Download

Last edited Feb 4, 2014 at 5:50 AM by asposemarketplace, version 2