Chart.SetSourceData procedure builder

Chart.SetSourceData (Word)

Sets the source data range for the chart.

SetSourceData (Source, PlotBy)

With ActiveDocument.InlineShapes(1) 
 If .HasChart Then 
 .Chart.SetSourceData _ 
 Source:="='Sheet1'!$A$1:$D$5", _ 
 End If 
End With


The following argument is required

Source (String) - The address of the chart data range that contains the source data.

Optional arguments

The following argument is optional

PlotBy - Specifies the way the data will be plotted. Can be either of the following XlRowCol constants: xlColumns or xlRows