Results 1 to 2 of 2

Thread: Change datasheet contents

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2001
    Posts
    6

    Change datasheet contents

    Hello,

    I'm creating a chart in word using VB with the following code :
    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.

    Code:
    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 :
    Code:
    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.

  2. #2

    Thread Starter
    New Member
    Join Date
    May 2001
    Posts
    6

    Solved

    Solved it myself already

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width