#1
|
|||
|
|||
Updating linked images in Powerpoint 2007
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 -cam |
#2
|
|||
|
|||
Fixed: I was inserting images using Insert --> Picture --> Insert and link
By using Insert --> Object --> Bitmap image, I can get images that update automatically as long as they are in bmp format. |
#3
|
|||
|
|||
Glad it's working. The problem with your code is that the picture will not be a msoEmbeddedOLEObject
It may be an MsoLinkedPicture or maybe msoPlaceholder with ContainedType = msoLinkedPicture Code:
Sub pixUpdater() Dim osld As Slide Dim oshp As Shape For Each osld In ActivePresentation.Slides For Each oshp In osld.Shapes If oshp.Type = msoLinkedPicture Then oshp.LinkFormat.Update If oshp.Type = msoPlaceholder Then If oshp.PlaceholderFormat.ContainedType = msoLinkedPicture Then oshp.LinkFormat.Update End If Next oshp Next osld End Sub |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Formatting issues when updating linked Excel charts | Becky808 | Word | 0 | 08-05-2015 03:38 AM |
Linked excel cells not updating in word | lucky16 | Word | 0 | 09-10-2014 07:40 AM |
Updating *from* a linked Word document | hanvyj | Word | 2 | 03-01-2012 02:21 AM |
Phantom spaces when updating linked fields | freefalladdict | Word | 3 | 01-08-2012 02:23 PM |
Auto-updating powerpoint from linked files for 3 weeks of data... Help? | chrisbru | PowerPoint | 1 | 07-08-2010 04:29 AM |