AfterNewPresentation Event

Microsoft PowerPoint Visual Basic

Show All Show All

AfterNewPresentation Event

Occurs after a presentation is created.

expression.AfterNewPresentation(Pres )

expression    Required. An object of type Application declared with events in a class module. For information about using events with the Application object, see Using Events with the Application Object.

Pres    Required Presentation. The presentation that is created.

Example

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