Auto updating excel links in Powerpoint

Toffeeman1975

New Member
Joined
Jun 10, 2021
Messages
3
Office Version
  1. 365
Hello All,
Would appreciate if someone could point me in the direction of a couple of options I could possibly explore.
I currently put a monthly deck together consistly of 30 slides (tables and graphs) copied and pasted with the links into powerpoint. For the first 3 months the powerpoint file was updating automatically, no issues, however I had to move both the excel and Powerpoint file to a different file path location.

I have since found that the links do not automatically update into powerpoint even though I have re-linked in every slide. The only way it allows me to update the slide is by manually selecting the edit update link and change source by selecting the updated excel file (doing this around 30 times).

Could someone please advise what might be the reason for powerpoint not to automatically update? The automatic box update is also ticked. Both the excel and powerpoint files are saved down with the same naming conventions for each month.

Any help would be much appreciated.

Thanks
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type

mrshl9898

Well-known Member
Joined
Feb 6, 2012
Messages
1,951
Vba can update them for you. See how you go with this. Change the links to the Excel files and run it from the PowerPoint file.


VBA Code:
Sub EditPowerPointLinks()

Dim oldFilePath As String
Dim newFilePath As String
Dim pptPresentation As Presentation
Dim pptSlide As Slide
Dim pptShape As Shape

'The old file path as a string (the text to be replaced)
oldFilePath = "String of\File Path\To Be Replaced\Excel File.xlsx"

'The new file path as a string (the text to replace with)
newFilePath = "String of\New File Path\Excel File 2.xlsx"

'Set the variable to the PowerPoint Presentation
Set pptPresentation = ActivePresentation

'Loop through each slide in the presentation
For Each pptSlide In pptPresentation.Slides

    'Loop through each shape in each slide
    For Each pptShape In pptSlide.Shapes
   
        'Find out if the shape is a linked object or a linked picture
        If pptShape.Type = msoLinkedPicture Or pptShape.Type _ 
        = msoLinkedOLEObject Or pptShape.Type = msoLinkedChart Then

            'Use Replace to change the oldFilePath to the newFilePath
            pptShape.LinkFormat.SourceFullName = Replace(LCase _
            (pptShape.LinkFormat.SourceFullName), LCase(oldFilePath), newFilePath)
            
        End If
    Next
Next

'Update the links
pptPresentation.UpdateLinks


End Sub
 

Toffeeman1975

New Member
Joined
Jun 10, 2021
Messages
3
Office Version
  1. 365
Hi,

Sorry not familar with VBA but will give it a go, do I have to create a macro on here. Could you kindly set out to where I need to code the above please.

Thanks
 

Toffeeman1975

New Member
Joined
Jun 10, 2021
Messages
3
Office Version
  1. 365
Hi MrSHL9898

I tried the above and code in powerpoint.

The nessage I get back when I saved it is:

The following cannot be saved in a macro-free presentations:

-Visual basic for applications (VBA) Project

To save a file with these features, click no to return to the save as dialog box, and then choose a macro-enabled file type in the file type list.

Any help appreciated.

Thanks
 

mrshl9898

Well-known Member
Joined
Feb 6, 2012
Messages
1,951
Ahh, sounds like you were close then. Save as the file and there is a drop down, select pptm as the type
 

Forum statistics

Threads
1,141,060
Messages
5,704,042
Members
421,324
Latest member
Devo182

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
Top