Hello,
I'm creating a chart in word using VB with the following code :
This chart has been saved in a Word document. Now I'm trying inCode:Set oShape = oWordDoc.Shapes.AddOLEObject( _ Left:=leftSize, Top:=100, width:=width, Height:=400, _ ClassType:="MSGraph.Chart", DisplayAsIcon:=False) Set oGraphChart = oShape.OLEFormat.object
another program to change the datasheet of this chart, so that
the chart will display the correct values.
There's only one chart in the document. But when I use this, VBCode:Set oShape = oWordDoc.Shapes.Item(1) Set oGraphChart = oShape.OLEFormat.object
gives the follow errormessage :
So my question is : how can I changed the chart in the document.Code:Class does not support Automation or does not support expected interface
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.


Reply With Quote
