Postie
Jun 6th, 2001, 05:59 AM
Hello,
I'm creating a chart in word using VB with the following code :
Set oShape = oWordDoc.Shapes.AddOLEObject( _
Left:=leftSize, Top:=100, width:=width, Height:=400, _
ClassType:="MSGraph.Chart", DisplayAsIcon:=False)
Set oGraphChart = oShape.OLEFormat.object
This chart has been saved in a Word document. Now I'm trying in
another program to change the datasheet of this chart, so that
the chart will display the correct values.
Set oShape = oWordDoc.Shapes.Item(1)
Set oGraphChart = oShape.OLEFormat.object
There's only one chart in the document. But when I use this, VB
gives the follow errormessage :
Class does not support Automation or does not support
expected interface
So my question is : how can I changed the chart in the document.
I want to use the chart as a template, so that I only have to change
the value in the Datasheet to obtain the correct chart.
Many thanks in advance.
I'm creating a chart in word using VB with the following code :
Set oShape = oWordDoc.Shapes.AddOLEObject( _
Left:=leftSize, Top:=100, width:=width, Height:=400, _
ClassType:="MSGraph.Chart", DisplayAsIcon:=False)
Set oGraphChart = oShape.OLEFormat.object
This chart has been saved in a Word document. Now I'm trying in
another program to change the datasheet of this chart, so that
the chart will display the correct values.
Set oShape = oWordDoc.Shapes.Item(1)
Set oGraphChart = oShape.OLEFormat.object
There's only one chart in the document. But when I use this, VB
gives the follow errormessage :
Class does not support Automation or does not support
expected interface
So my question is : how can I changed the chart in the document.
I want to use the chart as a template, so that I only have to change
the value in the Datasheet to obtain the correct chart.
Many thanks in advance.