update powerpoint links with vba

almagg

Well-known Member
Joined
Aug 21, 2002
Messages
705
when i open up the powerpoint template from Excel vba it does not update the links.
and when i try to do it manually it hangs because the Excel file is open.
i can't 'unhsare' the workbook because that is where the code is.

i tried:

For Each objSld In ActivePresentation.Slides
For Each objShp In osld.Shapes
If objShp.Type = msoLinkedOLEObject Then
objShp.LinkFormat.Update
Next objShp
Next objSld

but it does not work.


oh i was also trying to 'break links' after the update and on searching found a lot of complicated solutions. i decided to try replacing the above with:
.
.
objShp.LinkFormat.BreakLink
.
.

and it worked

but i need to update the template, which i will then save as a regular 'pptx' file.

thanks for the help.
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
fixed.
there was a link an external link in Excel that no longer existed aqnd that was causing the 'hangup'. once i removed the link the below code worked.
 
Upvote 0

Forum statistics

Threads
1,224,503
Messages
6,179,134
Members
452,890
Latest member
Nikhil Ramesh

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top