Consulting

Results 1 to 5 of 5

Thread: Remove all Animations and Transitions with Macro

  1. #1

    Question Remove all Animations and Transitions with Macro

    Hi,

    New user here with little VBA macro code experience. I'm struggling with modifying the excellent code from TheSpreadshhetGuru that removes all my animations.

    I would like the macro to also remove all transitions in my Powerpoint and set manual advance. I google some code, but struggling to tie it into the code from TSG? Any help would be appreciated:-)

    .SlideShowTransition.EntryEffect = ppEffectNone
    .SlideShowTransition.AdvanceOnTime = msoFalse



    Sub RemoveAllAnimations()
    'PURPOSE: Remove All PowerPoint Animations From Slides
    'SOURCE: www.TheSpreadsheetGuru.com/the-code-vault
    
    Dim sld As Slide
    Dim x AsLong
    Dim Counter AsLong
    
    'Loop Through Each Slide in ActivePresentation
    ForEach sld In ActivePresentation.Slides
    
    'Loop through each animation on slide
    For x = sld.TimeLine.MainSequence.Count To 1 Step -1
    
    'Remove Each Animation
              sld.TimeLine.MainSequence.Item(x).Delete
    
    'Maintain Deletion Stat
              Counter = Counter + 1
    
    Next x
    
    Next sld
    
    'Completion Notification
    MsgBox Counter & " Animation(s) were removed from you PowerPoint presentation!"
    
    EndSub

  2. #2
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,093
    Location
    Try

    Sub RemoveAllAnimations()
    'PURPOSE: Remove All PowerPoint Animations From Slides
    'SOURCE: www.TheSpreadsheetGuru.com/the-code-vault
    
    
    Dim sld As Slide
    Dim x As Long
    Dim Counter As Long
    
    
    'Loop Through Each Slide in ActivePresentation
    For Each sld In ActivePresentation.Slides
    'Loop through each animation on slide
    For x = sld.TimeLine.MainSequence.Count To 1 Step -1
    
    
    'Remove Each Animation
              sld.TimeLine.MainSequence.Item(x).Delete
    'Maintain Deletion Stat
              Counter = Counter + 1
    Next x
    sld.SlideShowTransition.AdvanceOnTime = False
    sld.SlideShowTransition.AdvanceOnClick = True
    sld.SlideShowTransition.EntryEffect = ppEffectNone
    Next sld
    
    
    'Completion Notification
    MsgBox Counter & " Animation(s) were removed from you PowerPoint presentation!"
    
    
    End Sub
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

  3. #3

    Wink

    Thanks a lot John for your swift reply and resolution:-) This one seem to do the trick

  4. #4
    I have a similar problem - I have a larger number of powerpoint files, in which each slide has dozens of animations with sound effects. I want to keep the animations but remove (or mute) the sound effects. Is there a way to do this?
    Last edited by paulwilson; 08-24-2021 at 10:11 PM. Reason: typo

  5. #5
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,093
    Location
    Try this (use a copy of the presentation just in case)

    Sub kill_soundeffect()
    Dim oeff As Effect
    Dim osld As Slide
    For Each osld In ActivePresentation.Slides
    For Each oeff In osld.TimeLine.MainSequence
    oeff.EffectInformation.SoundEffect.Type = ppSoundNone
    Next oeff
    Next osld
    End Sub
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •