[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1111
  • 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

Featured Post

Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

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