Hi Priya,
To import a chart to a Word document, first create the chart as an image file in the hard disk. Then use MS Word to import that image file into the document.
To create a chart as an image file in the hard disk, the API is BaseChart.makeChart. For example:
c.makeChart("c:\\\\mychart.png");
If you are running in a web environment, please make sure your web server anonymous user account has read/write access to the directory that you want to save the chart image.
After creating the chart image, you may use MS Word to import the image to a Word document. You can do that programmatically using C# by using MS Word automation. You may refer to Microsoft documentation on how to use MS Word.
For your reference, there is some code fragment about how to import a chart to Excel in the following thread, using Excel automation in C#:
http://www.chartdir.com/forum/download_thread.php?bn=chartdir_support&thread=1246621500#N1246898530
Hope this can help.
Regards
Peter Kwan |