Anakardian
Registered User.
- Local time
- Today, 15:49
- Joined
- Mar 14, 2010
- Messages
- 173
Good afternoon
I have been struggling with some word automation I set up for a word 2007 document.
It worked ok when it upgraded to 2010 however the upgrade to 2013 completely destroyed the functionality I was using.
The task I an looking to acommplish is relatively simple.
(GraphX is a number representing the specific graph I am working with.)
Does anyone have a way to open the chart data from VBA in order to refresh the data or alternatively overwrite the data present with something I insert using VBA?
I do not want to embed any spreadsheets as it would just require me to update 50+ graphs individually with the same data.
Linking requires me to have the graphs in the data sheet, something I do not want.
I have been struggling with some word automation I set up for a word 2007 document.
It worked ok when it upgraded to 2010 however the upgrade to 2013 completely destroyed the functionality I was using.
The task I an looking to acommplish is relatively simple.
- Open the graphdata
- refresh the data as it is pulling data from another sheet
- Close the chartdata again.
(GraphX is a number representing the specific graph I am working with.)
Code:
With ActiveDocument.InlineShapes(GraphX)
'Open and close the chartdata to update data
ActiveDocument.InlineShapes(GraphX).Chart.ChartData.Activate
ActiveDocument.InlineShapes(GraphX).Chart.Refresh
ActiveDocument.InlineShapes(GraphX).Chart.ChartData.Workbook.Close
End If
End With
I do not want to embed any spreadsheets as it would just require me to update 50+ graphs individually with the same data.
Linking requires me to have the graphs in the data sheet, something I do not want.