views:

32

answers:

1

I have successfully done this using "MSGraph.Chart.8" in VS 2010 and c# and the graphs look ancient and pixelated like back in 1995 or so. The help online seems all the same. like this one... http://support.microsoft.com/kb/316384

I really need to generate these word documents with nicer graphs in code, or at least edit an existing word document and set the data for graphs and text in code. How is that done in the 21st century? Namely Word 2007 with those nicer looking charts.

(OR is there a way to build an aspx page that can dump it's content to a word doc? anything!)

Thanks, willgroove

+1  A: 

You need to look at the word api

Here is some sample code to get you started you need to add a reference to the word com library.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;
using Microsoft.Office.Interop.Word;

static void Main(string[] args)
{
        Application App = new Application();
        Document D = App.Documents.Add();
        App.Visible = true;
         D.Content.Text = "hi I'm a new word doc";


 }
rerun
The word api link is helpful. However, I had hoped someone would read my post and understand that I have already successfully created a word document with graphs via c#, much as you describe. I'm really asking more specifically about better looking charts.
willgroove
Have you looked At GNUPlot what types of graphs do you need to generate
rerun
i need simple pie charts. gnuplot sounds cool, though. thanks, rerun.
willgroove