Powerpoint Macro to remove all linked files

%3CLINGO-SUB%20id%3D%22lingo-sub-3302408%22%20slang%3D%22en-US%22%3EPowerpoint%20Macro%20to%20remove%20all%20linked%20files%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3302408%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20all%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESo%20I%20have%20a%20live%20PowerPoint%20file%20that%20I%20save%20every%20week%20in%20a%20new%20file%20to%20create%20a%20snapshot.%20The%20live%20file%20is%20linked%20to%20an%20excel%20spreadsheet%20but%20once%20I%20save%20it%2C%20I%20no%20longer%20want%20it%20to%20update.%20At%20the%20minute%20I%20am%20using%20this%20macro%20to%20break%20all%20the%20links%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESub%26nbsp%3BBreakAllExcelLinks()%3C%2FP%3E%3CP%3EDim%26nbsp%3Bshp%26nbsp%3BAs%26nbsp%3BShape%3CBR%20%2F%3EDim%26nbsp%3Bsld%26nbsp%3BAs%26nbsp%3BSlide%3C%2FP%3E%3CP%3E'Loop%20Through%20Each%20Slide%20in%20ActivePresentation%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3BFor%26nbsp%3BEach%26nbsp%3Bsld%26nbsp%3BIn%26nbsp%3BActivePresentation.Slides%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3BFor%26nbsp%3BEach%26nbsp%3Bshp%26nbsp%3BIn%26nbsp%3Bsld.Shapes%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3BOn%26nbsp%3BError%26nbsp%3BResume%26nbsp%3BNext%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3Bshp.LinkFormat.BreakLink%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3BOn%26nbsp%3BError%26nbsp%3BGoTo%26nbsp%3B0%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3BNext%26nbsp%3Bshp%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3BNext%26nbsp%3Bsld%3C%2FP%3E%3CP%3EEnd%26nbsp%3BSub%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20works%20great%20however%20I%20get%20this%20an%20update%20message%20everytime%20I%20open%20the%20file%20even%20though%20the%20links%20have%20been%20broken%20for%20every%20single%20link%2C%20so%20this%20message%20needs%20clearing%2018%20times.%20So%20I'm%20looking%20for%20a%20macro%20that%20either%20changes%20the%20all%20the%20'perceived%20links'%20to%20a%20manual%20update%20so%20it%20no%20longer%20brings%20the%20box%20up%2C%20or%20a%20macro%20that%20completely%20removes%20every%20link%20from%20the%20linked%20update%20box%20so%20it%20shows%20completely%20blank%20and%20so%20physically%20has%20nothing%20connected.%20Is%20this%20possible%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-3302408%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EMicrosoft%20365%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Occasional Contributor

Hi all,

 

So I have a live PowerPoint file that I save every week in a new file to create a snapshot. The live file is linked to an excel spreadsheet but once I save it, I no longer want it to update. At the minute I am using this macro to break all the links:

 

Sub BreakAllExcelLinks()

Dim shp As Shape
Dim sld As Slide

'Loop Through Each Slide in ActivePresentation
  For Each sld In ActivePresentation.Slides
    For Each shp In sld.Shapes
      On Error Resume Next
        shp.LinkFormat.BreakLink
      On Error GoTo 0
    Next shp
  Next sld

End Sub

 

This works great however I get this an update message everytime I open the file even though the links have been broken for every single link, so this message needs clearing 18 times. So I'm looking for a macro that either changes the all the 'perceived links' to a manual update so it no longer brings the box up, or a macro that completely removes every link from the linked update box so it shows completely blank and so physically has nothing connected. Is this possible?

 

0 Replies