• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1119
  • Last Modified:

Update PowerPoint 2010 chart based on Access 2010 table or query

I have a number of PowerPoint 2010 slides that have charts based on Access 2010 tables or queries.

The base data changes daily.  However, when I close and reopen the PowerPoint presentation/slideshow, the data is not refreshed.

Is there a way (with code?) to force all of the slides to refresh without a warning box popping up?

Thank you in advance.
0
Scamquist
Asked:
Scamquist
  • 2
  • 2
1 Solution
 
JSRWilsonCommented:
I don't use Access but maybe this would work in PPT

Sub updater()
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
End If
Next
Next
End Sub

Open in new window

0
 
ScamquistAuthor Commented:
Stepping through the code, the line
If oshp.Type = msoLinkedOLEObject Then

fails and goes to the next slide.  No update
0
 
JSRWilsonCommented:
I guess that isn't the correct shape type then.

Maybe try to update all linked items

Sub updater()
Dim osld As Slide
Dim oshp As Shape
On Error Resume Next
For Each osld In ActivePresentation.Slides
For Each oshp In osld.Shapes
oshp.LinkFormat.Update
Next
Next
End Sub

Or find out the type by selecting a chart and running

Sub MyType()
MsgBox ActiveWindow.Selection.ShapeRange(1).Type
End Sub
0
 
ScamquistAuthor Commented:
Thank you.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now