Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Insert Excel Chart in Word
Message
De
19/07/2011 14:57:17
 
 
À
19/07/2011 09:54:33
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
01518504
Message ID:
01518531
Vues:
44
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform