Re: MS Word Chart filled with data - URGENT PLEASE



Can you possibly demonstrate in the Set oChart statement the use of a
dataset?




""Peter Huang" [MSFT]" <v-phuang@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:yXdF6LE6GHA.4344@xxxxxxxxxxxxxxxxxxxxxxxx
Hi,

Here I understand that you means the Chart that using Word Menu,
Insert/Picture/Chart.
So I think you may try to transfer the DataSet to a Excel Workbook and
then
import the excel file into the Chart.

Here is a VBA macro for your reference, but it is easy to run the similar
code in VB.NET.

Sub Macro1()
Dim oChart As Graph.Chart 'Add reference to Graph Object library
Set oChart =
Selection.InlineShapes.AddOLEObject(ClassType:="MSGraph.Chart.8",
LinkToFile:=False, DisplayAsIcon:=False).OLEFormat.Object
oChart.Application.FileImport "C:\temp\TestABC.xls"
End Sub

How to automate Word from Visual Basic .NET to create a new document
http://support.microsoft.com/default.aspx?scid=kb;[LN];316383

How to automate Microsoft Word to perform a mail merge from Visual Basic
NET
http://support.microsoft.com/default.aspx?scid=kb;[LN];302816

How to automate Microsoft Word to perform a mail merge from Visual Basic
NET
http://support.microsoft.com/default.aspx?scid=kb;[LN];301656

Here is a link about how to transfer data into Excel Workbook in VB.NET.
How to transfer data to an Excel workbook by using Visual Basic .NET
http://support.microsoft.com/default.aspx?scid=kb;[LN];306022

You may have a try and let me know the result.

If I misunderstood or you have any conern on this issue, please feel free
to let me know and I am glad to be of assistance.


Best regards,

Peter Huang

Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no
rights.



.



Relevant Pages

  • RE: MS Word Chart filled with data - URGENT PLEASE
    ... Here I understand that you means the Chart that using Word Menu, ... How to automate Microsoft Word to perform a mail merge from Visual Basic ... Here is a link about how to transfer data into Excel Workbook in VB.NET. ...
    (microsoft.public.dotnet.languages.vb)
  • Cannot see vertical line in OWC10
    ... I have a OWC10 line chart. ... Sub Window_onLoad ... Set oChart = ChartSpace1.Charts.Add ... 'I was expect to see a verticle line at point b from 5 to 25 ...
    (microsoft.public.office.developer.web.components)

Loading