J
Josh T
I am programatically modifying an existing chart in Excel 2007 and need to
embed it into a document. The problem stems that we do not initially know
how many charts will be embedded, and they all differ in data points. Thus
because of the way they are linked (between Word and Excel) we cannot do the
following:
for each DataSet in All_DataSets
// create or modify data
Chart.Copy();
Document.Paste();
If we continue to modify any of the data points for a chart (and it has
already been once copied to the Word document) then all charts update
accordingly since they all refer to the same version. Each chart is
different in data but of the same type.
The only solution that I have figured out is to do a manual Copy (Ctrl + C)
and in Word do a Paste Special. Only then am I presented with the option to
paste it as a Microsoft Office Excel Chart Object, which solves my problem.
Doing a programattic Copy and a manual Paste Special does not give this
option.
How can we programatically copy the chart as an MS Office Excel Chart
Object so that we can continue to udpate the next data set without
modifying an already existing chart?
-- Josh
embed it into a document. The problem stems that we do not initially know
how many charts will be embedded, and they all differ in data points. Thus
because of the way they are linked (between Word and Excel) we cannot do the
following:
for each DataSet in All_DataSets
// create or modify data
Chart.Copy();
Document.Paste();
If we continue to modify any of the data points for a chart (and it has
already been once copied to the Word document) then all charts update
accordingly since they all refer to the same version. Each chart is
different in data but of the same type.
The only solution that I have figured out is to do a manual Copy (Ctrl + C)
and in Word do a Paste Special. Only then am I presented with the option to
paste it as a Microsoft Office Excel Chart Object, which solves my problem.
Doing a programattic Copy and a manual Paste Special does not give this
option.
How can we programatically copy the chart as an MS Office Excel Chart
Object so that we can continue to udpate the next data set without
modifying an already existing chart?
-- Josh