What is the VBA equivalent of "Refresh Data" for linked chart from Excel in Word 2010?

I want to be able to refresh all charts (possibly hundreds) in Word 2010 that have been pasted from Excel 2010 as new Chart Objects.

I realise that they are represented as Inline shapes rather than Word Fields and have found the following methods so far:

ActiveDocument.InlineShapes.Item(1).Chart.Refresh  -- Seems to just redraw the chart in the document.

ActiveDocument.InlineShapes.Item(1).Chart.ChartData --> there are no methods under here to refresh the chart.

When selecting the chart I am able to update it using Design -> Data -> Refresh Data from the ribbon. When using this button with a macro recorded nothing is outputted to the VBA editor.

There must be someway of updating all charts programatically just as you could in the old days by using Fields.Update.

any help would be appreciated.

 

regards,

Sharat

 

 

Answer
Answer

Not sure about this, but try ActiveDocument.InlineShapes(1).LinkFormat.Update

 

HTH,

 

Eric

If this post is helpful or answers the question, please mark it so.

1 person found this reply helpful

·

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated February 23, 2024 Views 3,895 Applies to: