Chart.SetDefaultChart Method (Word)
Specifies the name of the chart template that Microsoft Word uses when it creates new charts.
Version Information
Version Added: Word 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
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