全部显示

NewPresentation 事件

       

在新建一份演示文稿后发生,同时将其添加到 Presentations 集合。

Private Sub application_NewPresentation(ByVal Pres As Presentation)

application  Application 类型的对象,在类模块中声明,自身具有事件。有关使用 Application 对象的事件的详细信息,请参阅使用 Application 对象的事件

Pres  新演示文稿。

示例

本示例使用 RGB 函数将新演示文稿的幻灯片母版的背景色设置为粉红色,再将第三种配色方案应用于该新演示文稿。

Private Sub App_NewPresentation(ByVal Pres As Presentation)
    With Pres
        Set CS3 = .ColorSchemes(3)
        CS3.Colors(ppBackground).RGB = RGB(240, 115, 100)
        .SlideMaster.ColorScheme = CS3
    End With
End Sub