Posted By

sjmoorecouk on 10/25/12


Tagged

Microsoft word


Versions (?)

Linked Chart Update


 / Published in: Visual Basic
 

Relinks chart objects to a new source (where newfile is the variable containing that new full path/file source info)

  1. Dim thisShape As Word.Shape
  2. Dim x as Long
  3. UpdateCharts:
  4. On Error Resume Next
  5. For Each thisShape In ActiveDocument.Shapes
  6. x = x + 1
  7. If thisShape.Type = msoLinkedOLEObject Then
  8. With thisShape.LinkFormat
  9. .SourceFullName = newFile
  10. StatusBar = x & " of " & TotalFieldCount & " links completed ..."
  11. End With

Report this snippet  

You need to login to post a comment.