Achtergrondkleur van masterdia instellen

VSTO


 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


 //Instantieer de Presentation-klasse die het presentatiebestand vertegenwoordigt

using (PresentationEx pres = new PresentationEx())
{
	//Stel de achtergrondkleur van de Master ISlide in op Bosgroen
	pres.Masters[0].Background.Type = BackgroundTypeEx.OwnBackground;
	pres.Masters[0].Background.FillFormat.FillType = FillTypeEx.Solid;
	pres.Masters[0].Background.FillFormat.SolidFillColor.Color = Color.ForestGreen;
	//Schrijf de presentatie naar schijf
	pres.Save("Setting Background Color of Master Slide.pptx", SaveFormat.Pptx);
}

Voorbeeldcode downloaden