Chart.SetDefaultChart Method (Word)

Specifies the name of the chart template that Microsoft Word uses when it creates new charts.

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

See also

Chart Object