Automate Microsoft Word and Excel Sample
|Visual FoxPro 9.0 SP2|
|Automate Microsoft Word and Excel Sample|
This is a simple sample showing Visual FoxPro as an Automation controller. It demonstrates how to select data from a Visual FoxPro database, place the data in a Microsoft Excel worksheet, graph the data using Chart, and then display the graph in Word. To use this sample, you need at least Excel 5.0, Word 6.0, and Testdata.dbc, located in the ...\Samples\Data directory.
The following line of code creates a reference to a Microsoft Excel spreadsheet.
The following line of code adds a chart to the spreadsheet.
objChart1 = objXLsheet.ChartObjects.Add(100, 100, 200, 200)
The following line of code creates a reference to Microsoft Word.
objWDdoc=createobject("word.basic") oWordRef = GetObject('','word.basic')
Comment or report problem with topic