Đặt màu nền của Master Slide
Contents
[
Hide
]
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
//Khởi tạo lớp Presentation đại diện cho tệp tin trình chiếu
using (PresentationEx pres = new PresentationEx())
{
//Đặt màu nền của Master ISlide thành màu Xanh rừng
pres.Masters[0].Background.Type = BackgroundTypeEx.OwnBackground;
pres.Masters[0].Background.FillFormat.FillType = FillTypeEx.Solid;
pres.Masters[0].Background.FillFormat.SolidFillColor.Color = Color.ForestGreen;
//Ghi trình chiếu ra đĩa
pres.Save("Setting Background Color of Master Slide.pptx", SaveFormat.Pptx);