Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Insert Excel Chart in Word
Message
From
19/07/2011 14:57:17
 
 
To
19/07/2011 09:54:33
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
01518504
Message ID:
01518531
Views:
43
>Hi,
>
>I am trying to create a chart in Excel and then place it in a Word document.

When I did this for a client last year, I found that it worked best to save the chart, close Excel and then use Word's InlineShapes.AddOLEObject method to put the chart into the document. The key part of my code looks like this, where cChartFile contains the name of the chart file.
	oRange = oDoc.Bookmarks["Graph"].Range()
	oRange.Collapse(0)
	
	oChart = oDoc.InlineShapes.AddOLEObject(, m.cChartFile, .F., .F., , , ,m.oRange)
Tamar
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform