设置母版幻灯片的背景颜色
Contents
[
Hide
]
VSTO
PowerPoint.Presentation presentation =
Globals.ThisAddIn.Application.Presentations.Open("设置母版幻灯片的背景颜色.ppt", Office.MsoTriState.msoFalse, Office.MsoTriState.msoFalse, Office.MsoTriState.msoTrue);
presentation.SlideMaster.Background.Fill.ForeColor.RGB = -654262273;
Aspose.Slides
//实例化表示演示文稿文件的 Presentation 类
using (PresentationEx pres = new PresentationEx())
{
//将母版 ISlide 的背景颜色设置为森林绿
pres.Masters[0].Background.Type = BackgroundTypeEx.OwnBackground;
pres.Masters[0].Background.FillFormat.FillType = FillTypeEx.Solid;
pres.Masters[0].Background.FillFormat.SolidFillColor.Color = Color.ForestGreen;
//将演示文稿写入磁盘
pres.Save("设置母版幻灯片的背景颜色.pptx", SaveFormat.Pptx);