Chart.SetDefaultChart method (PowerPoint)
Specifies the name of the chart template that Microsoft Word uses when it creates new charts.
expression.SetDefaultChart (Name)
expression A variable that represents a Chart object.
Name | Required/Optional | Data type | Description |
---|---|---|---|
Name | Required | Variant | Specifies the name of the default chart template that Word uses when it creates new charts. This name can be set to either the name of a user-defined chart template in the gallery or a special XlChartGallery constant, xlBuiltIn, to specify a built-in chart template. |
Note
Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.
The following example sets the default chart template to a custom chart template named "Monthly Sales."
With ActiveDocument.InlineShapes(1)
If .HasChart Then
.Chart.SetDefaultChart Name:="Monthly Sales"
End If
End With
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.