Thread: [Solved] Changing Video Link Paths
View Single Post
 
Old 09-02-2012, 07:22 AM
JohnWilson JohnWilson is offline Windows 7 64bit Office 2010 32bit
Programmer
 
Join Date: Nov 2008
Location: UK
Posts: 1,913
JohnWilson has a spectacular aura aboutJohnWilson has a spectacular aura about
Default

If you decide exactly which part of the link needs to change you should be able to do this.

Code:
Sub change_path()
Dim osld As Slide
Dim oshp As Shape
For Each osld In ActivePresentation.Slides
For Each oshp In osld.Shapes
If oshp.Type = msoMedia Then
If oshp.MediaType = ppMediaTypeMovie Then
On Error Resume Next ' in case there are embedded videos
If oshp.LinkFormat.SourceFullName <> "" Then
'original was C:\users\John\Desktop\MyVids\vid.wmv
'new path is C:\users\John\Desktop\MyNewVids\vid.wmv
oshp.LinkFormat.SourceFullName = Replace(oshp.LinkFormat.SourceFullName, Find:="MyVids", Replace:="MyNewVids")
End If
End If
End If
Next oshp
Next osld
End Sub
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials
Reply With Quote