打开已存在的演示文稿时发生此事件,同时该演示文稿会添加到 Presentations 集合中。
Private Sub application_PresentationOpen(ByVal Pres As Presentation)
application Application 类型的对象,在类模块中声明,自身具有事件。有关使用 Application 对象的事件的详细信息,请参阅使用 Application 对象的事件。
Pres 打开的演示文稿。
本示例修改第三种配色方案的背景色,再将修改后的配色方案应用于刚打开的演示文稿,并在幻灯片视图中显示该演示文稿。
Private Sub App_PresentationOpen(ByVal Pres As Presentation)
With Pres
Set CS3 = .ColorSchemes(3)
CS3.Colors(ppBackground).RGB = RGB(240, 115, 100)
With Windows(1)
.Selection.SlideRange.ColorScheme = CS3
.ViewType = ppViewSlide
End With
End With
End Sub