AfterNewPresentation 事件 (PowerPoint)Application.AfterNewPresentation event (PowerPoint)

在创建演示文稿后发生。Occurs after a presentation is created.

语法Syntax

expressionexpression. AfterNewPresentation( _Pres_ )

_表达式_一个返回**Application** 对象的表达式。expression An expression that returns an Application object.

参数Parameters

名称Name 必需/可选Required/Optional 数据类型Data type 说明Description
PresPres 必需Required PresentationPresentation 演示文稿的名称。Name of the presentation.

示例Example

本示例使用RGB函数将新演示文稿的幻灯片母版的背景色设置为橙红粉红色, 然后将第三种配色方案应用于新演示文稿。This example uses the RGB function to set the slide master background color for the new presentation to salmon pink, and then applies the third color scheme to the new presentation.

Private Sub App_AfterNewPresentation(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

另请参阅See also

Application 对象Application Object

支持和反馈Support and feedback

有关于 Office VBA 或本文档的疑问或反馈?Have questions or feedback about Office VBA or this documentation? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.