Re: VBA Command to Refresh Excel Charts in Word 2007?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Hi Doug,

Thanks kindly for your assistance. These two charts are the only
items that are externally linked and I had previously tried your first
suggestion, but without success. This is new territory for me, so
bear with me as I stumble through this with you, but I originally cut
and paste these charts from Excel and chose the "Chart (linked to
Excel data)" option within the accompanying Paste options tag. The
document update method is set to manual and I can refresh the links
either through the Links dialog or by way of the Refresh Data command
within the Chart Tools - Data panel. So just to clarify this in my
own mind, does Word treat these charts as "fields", or do I need to do
something else to have them recognized as such or, alternatively, link
to them in some other fashion so as to have them properly initialized?

Thanks again for helping me complete this last piece of the puzzle.

Best regards,
Paul


On Mon, 2 Jun 2008 10:24:31 +1000, "Doug Robbins - Word MVP"
<dkr@xxxxxxxxxxxxxxxxxx> wrote:

If it is OK to update all of the fields in the document, then use

ActiveDocument.Fields.Update

If you only want to update Links in the document, then use

Dim alf as Field
For each alf in ActiveDocument.Fields
If alf.Type = wdFieldLink then
alf.Update
End if
Next

.