Link to home
Start Free TrialLog in
Avatar of Avi Guud
Avi Guud

asked on

VBA PPT: Change all links in a PPT presentation

I had this question after viewing VBA to change source of links in PowerPoint.

I tried this code in PowerPoint 2013 but it doesn't seem to word there, any suggestion of how can we link all the links to a different Excel file or folder?
ASKER CERTIFIED SOLUTION
Avatar of Bill Prew
Bill Prew

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Avi Guud
Avi Guud

ASKER

Hey Bill,

Thanks for the quick answer!

I tried it like you wrote (saved + update links) and it seems like all the "Macro-Enabled Worksheet" type were updated to the new file, but the "Chart" type are still linked to the previous Excel file...

Is there something I can add to the code in order to update the charts as well?
Okay, I tried a test with a linked Excel sheet, let me try a chart...


»bp
I added
Or pptShape.Type = msoChart
to the code and it worked perfectly!

Many thanks again for the help Bill!
A chart link worked here.  Can you share your PPT here?


»bp
Okay, great, glad you got it working.


»bp
Actually I have one last question.

If I would like to change the source of the links to a different file, but not something that currently exists on MY computer, but to a location on someone else's computer, so if I send him the 2 connected files (Excel & PPT) they will be automatically linked if I already put the "future" location in the code.

I tried to do it with the current code but it says "run-time error, Method 'SourceFullName' of object LinkFormat failed"
I think it happens because the "future location" of the file doesn't really exist on my computer...
Is there a way to do that? This way the person who will get the files won't have to do anything and the files will already be linked.

Thanks!
I'm not aware of a way to include a link to a non-existant file.


»bp
Alright, thanks Bill!