Fix links to photos

  • Thread starter Thread starter Begadoc
  • Start date Start date
B

Begadoc

I am sure this question will have been asked before (and I have looked
through old posts) and I apologise for asking it again, but I would be
grateful for help.

I created a photo presentation with "Link to file" for each photo. This
worked fine on my PC but when I moved it to my laptop, all the links were
lost (though I moved the entire folder structure intact. I suspect though
that the one thing that will have changed is the drive letter.

From the Help file it seems that I should be able to use Automatic update to
fix this, but the Link option under View is greyed out so I can't access
this option.

Any help would be greatly appreciated.
 
Provided that only the paths have changed and not the file names of the
images, and replace 'C:\New Location\' with the path to that new
folder. The code is designed to work through the presentation looking
for linked images and set it to the folder you specified. The image should
be present in the folder else the update won't work.

or you can use the add-in mentioned at the bottom which has a links tool
which can perform the same task.

' ========= Begining of code =========
Public Const NewLinkPath = "C:\New Location\"

Sub UpdateLnkImgPaths()
Dim Sld As Slide
Dim Shp As Shape
' Loop thru each slide
For Each Sld In ActivePresentation.Slides
For Each Shp In Sld.Shapes
With Shp
' If the shape's type is an linked image object then...
If .Type = msoLinkedPicture Then
' Extract the filename from the complete path.
' Concatinate the new Path and filename and assign
' it to the SourceFullName property
With .LinkFormat
.SourceFullName = NewLinkPath & _
Right(.SourceFullName, InStr(1, _
StrReverse(.SourceFullName), "\") - 1)
End With
End If
End With
Next Shp
Next Sld
End Sub

Public Function StrReverse(ByVal sIn As String) As String
Dim nC As Integer, sOut As String
For nC = Len(sIn) To 1 Step -1
sOut = sOut & Mid(sIn, nC, 1)
Next
StrReverse = sOut
End Function
' ==== End of Code ====
--
Regards
Shyam Pillai

Toolbox for PowerPoint
http://www.mvps.org/skp/toolbox
 
The Edit/Links dialog you mention works with OLE links (ie, from Excel and
similar apps).
Picture links are entirely different and can't be manually edited w/o addins
or macros.

Luckily, there's a free one: go to http://get.pptools.com and
download/install the free FixLinks demo. The demo will help you fix your
linked images so they'll work on any system, so long as the pictures and the
PPT file are in the same folder.



--

Steve Rindsberg PPT MVP
PPTLive ( http://www.pptlive.com ) Featured Speaker
PPTools: http://www.pptools.com
PPT FAQ: http://www.pptfaq.com
 
Back
Top