Chart.SetDefaultChart Method (PowerPoint)
Specifies the name of the chart template that Microsoft Word uses when it creates new charts.
Version Information
Version Added: PowerPoint 2007
Syntax
expression .SetDefaultChart(Name)
expression A variable that represents a Chart object.
Parameters
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. |
Example
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