#1
|
|||
|
|||
Changing Video Link Paths
I have a PowerPoint presentation with Video files linked to disk files. The Videos stop working because the paths become incorrect when moving the PowerPoint file around to different machines.
Under File/Options/ "Edit links to files" one can see the paths but one can only open the source and "change source" option is greyed. One can update them individually by trying to play each video. Painful I am looking for a vba script to change the path of these linked videos. I have done this in Word 2010, but do not understand PowerPoint objects. Thanks for your help |
#2
|
|||
|
|||
Are there things you are not telling us?
Video is embedded by default in 2010 AND if you choose to link it IS possible to edit the link. Maybe this is a file from an earlier version or you are in Compatibility mode?? You need to say - it matters! It will also help if you say how the linki will change eg C:\ becomes D:\ or "MainFile" >> "SubFile" |
#3
|
|||
|
|||
Hi John,
Not copatibility mode, but file was saves as a pptx probably (don't know history). Just did a test and yes it obviously came from past versions as Insert/video from file does not create links in a fresh file. Path would change from say c:\a to c:\b\c for example. |
#4
|
|||
|
|||
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 |
#5
|
|||
|
|||
Many thanks John
I understand the code and did a trial and it works. One point is that PP wants to embedd it and if I say yes it just plays a blank avi. If I say no it works fine. Now I will write a front end and post it for others when finished. Appreciate the help. Julian |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Two motion paths | iskenderbaris | PowerPoint | 0 | 04-12-2012 03:13 AM |
Relative path for video link? Is it possible? | Baudisson | PowerPoint | 1 | 01-10-2012 02:19 AM |
motion paths | Cath5000 | PowerPoint | 0 | 07-29-2011 10:59 AM |
Powerpoint with audo and video convert to video | BasSander | PowerPoint | 0 | 06-22-2011 02:37 AM |
Motion Paths with Rotation | PBone | PowerPoint | 4 | 01-13-2011 11:59 AM |