Second, code you can use as a reference when automating Graph - the Sub
below automates Graph from PowerPoint. You can easily update it to work from
Word, instead. Be sure also to add a reference to the Graph object library
before you run this.
*******************
Sub InsertGraph()
Dim objGraph As Object
Dim shpGraph As PowerPoint.Shape
Dim objDatasheet As Object
With ActivePresentation.Slides(1)
Set shpGraph = _
.Shapes.AddOLEObject _
(classname:="msgraph.chart.8", link:=msoFalse)
End With
Set objGraph = shpGraph.OLEFormat.Object
Set objDatasheet = objGraph.Application.datasheet
objGraph.Application.Chart.ChartType = xlLine
End Sub