Populating datasheet in MSGraph from C#.NET

W

WA

Hi,

I am very new to this so please bear with me.
I have been following the example http://support.microsoft.com/kb/316384
but would like to know how I can create my own chart.

I have some data which needs to be plotted using a line chart and
output to a word document as in the example but how do I create my own
datasheet and populate it with my own data?

Any help would be greatfully appreciated!!
 
C

Cindy M.

Hi Wa,
I am very new to this so please bear with me.
I have been following the example http://support.microsoft.com/kb/316384
but would like to know how I can create my own chart.

I have some data which needs to be plotted using a line chart and
output to a word document as in the example but how do I create my own
datasheet and populate it with my own data?
I suggest you first do this as an "end-user" in the Word application in
order to get a feel for how the MS Graph applet works. That will make it
easier for you to envision what you're doing in code.

Please note that MS Graph uses the same graphing engine as Excel charts
(2003 and earlier), so much of the object model is the same. The biggest
difference is where it gets the data. The MS Graph applet provides a
Datasheet object that depends off the Application object.

The next thing I'd do, were I you, would be to use VBA to program (roughly)
what you need. VBA because then you'll be able to have Intellisense (not
available with the PInvoke the KB article uses) and you'll be able to
follow code samples you find on the Internet, such as this recent message
thread in the word.vba.general newsgroup: "Insert graph with macro".

Once you have that you'll know what you have to pass to InvokeMethod...

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top