Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-02-2012, 05:56 AM
julianpaul julianpaul is offline Changing Video Link Paths Windows 7 64bit Changing Video Link Paths Office 2010 64bit
Novice
Changing Video Link Paths
 
Join Date: Sep 2012
Posts: 3
julianpaul is on a distinguished road
Default 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
Reply With Quote
  #2  
Old 09-02-2012, 06:28 AM
JohnWilson JohnWilson is offline Changing Video Link Paths Windows 7 64bit Changing Video Link Paths Office 2010 32bit
Programmer
 
Join Date: Nov 2008
Location: UK
Posts: 1,912
JohnWilson has a spectacular aura aboutJohnWilson has a spectacular aura about
Default

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"
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials
Reply With Quote
  #3  
Old 09-02-2012, 06:47 AM
julianpaul julianpaul is offline Changing Video Link Paths Windows 7 64bit Changing Video Link Paths Office 2010 64bit
Novice
Changing Video Link Paths
 
Join Date: Sep 2012
Posts: 3
julianpaul is on a distinguished road
Default

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.
Reply With Quote
  #4  
Old 09-02-2012, 07:22 AM
JohnWilson JohnWilson is offline Changing Video Link Paths Windows 7 64bit Changing Video Link Paths Office 2010 32bit
Programmer
 
Join Date: Nov 2008
Location: UK
Posts: 1,912
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
  #5  
Old 09-03-2012, 01:55 AM
julianpaul julianpaul is offline Changing Video Link Paths Windows 7 64bit Changing Video Link Paths Office 2010 64bit
Novice
Changing Video Link Paths
 
Join Date: Sep 2012
Posts: 3
julianpaul is on a distinguished road
Default

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
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Two motion paths iskenderbaris PowerPoint 0 04-12-2012 03:13 AM
Changing Video Link Paths 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

Other Forums: Access Forums

All times are GMT -7. The time now is 04:17 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft