Hi all
Office 2007
I've got some images linked into a Powerpoint file. I'd like the imges to update on opening the presentation or via a macro in another file.
Some additional data is contained in an excel file that's similarly linked to provide tables/graphs in the powerpoint. These update with no problem.
I inserted the images using the Insert & Link option. They all show up in the
Prepare -->
Edit Links to Files as manual updates and I'm unable to change them to automatic (the options are greyed out). Excel content shows up as automatic.
On opening the spreadsheet, I get the update popup and the automatic content is updated when I indicate to update the content with
Update Links but in order to update the images, I need to go to
Edit Links to Files and update each manual link individually.
Ideally, I'd like to update the images when a user opens the powerpoint slides. I've not been able to get that to work. Using some VBA I found online as follows, I also tried running a macro from a control button in the Excel file in an attempt to update the images but using it, nothing updates, even the automatic updates. My VBA coding abilities are beginner.
Code:
Sub update()
Dim i As Integer
Dim s As Integer
Dim PPT As Object
Set PPT = CreateObject("PowerPoint.Application")
PPT.Visible = True
PPT.Presentations.Open "Dashboard.pptm"
For i = 1 To PPT.ActivePresentation.Slides.Count
For s = 1 To PPT.ActivePresentation.Slides(i).Shapes.Count
If PPT.ActivePresentation.Slides(i).Shapes(s).Type = msoEmbeddedOLEObject Then
PPT.ActivePresentation.Slides(i).Shapes(s).LinkFormat.Update
End If
Next s
Next i
PPT.ActivePresentation.Save
PPT.Quit
End Sub
Any suggestions are welcome.
-cam