Refresh links to Excel charts


G

Guest

I have a powerpoint briefing that has 75 pages of charts that are linked from
Excel. The Excel file has a number of querytables that are actually
Accessqueries that generate data for these slides.

When I open this PPT file, it asks me if I want to update my links to the
Excel file. That works great, except that it doesn't force Excel to update
its queries and charts before PPT does its link update. I've got a command
button on the first page of my PPT presentation that opens Excel, and
refreshes all of the query tables, which updates all of the Excel charts.

How do I "programmatically" get PPT to re-refresh all of the links to the
Excel charts?

I'm sure there is probably some object that I can iterate through (like
below), I'm just not familiar enough with the PPT object model to know what
it is.

For each lnk in activepresentation.links
lnk.refresh
Next lnk

Thanks in advance.
 
Ad

Advertisements

G

Guest

Maybe something like this?

Sub linkupdate()
Dim osld As Slide
Dim oshp As Shape
For Each osld In ActivePresentation.Slides
For Each oshp In osld.Shapes
If oshp.Type = msoLinkedOLEObject Then _
oshp.LinkFormat.Update
Next oshp
Next osld
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top