How to refresh the active Slide in a slide show?

11,014

Solution 1

In the end I found my answer in this blog post. It appears to be a bug in PowerPoint 2007.

This code helps to fix the bug:

Dim osld As Slide
'get current slide
Set osld = ActivePresentation.SlideShowWindow.View.Slide
'the next line adds the empty textbox and refreshs the slide
osld.Shapes.AddTextbox msoTextOrientationHorizontal, 1, 1, 1, 1

Solution 2

I found this bug in my Power Point as well, I add this line into the code and it fixes the bug

Application.SlideShowWindows(1).View.GotoSlide Me.SlideIndex

Share:
11,014
Christopher
Author by

Christopher

Updated on June 05, 2022

Comments

  • Christopher
    Christopher about 2 years

    Based on my last question I got the right code to change the image of an shape.
    Unfortunatly, this does not update the active Presentation. If I close the presentation and restart it, the image is changed, but the change should be directly visible.

    This is my code to change the image:

    ActivePresentation.SlideShowWindow.View.Slide.Shapes("SolutionA_Image").Fill.UserPicture ("D:\User\SolutionWrong.jpg")
    

    I found a way to update the presentation, but this lets the presentation flicker.

    ActivePresentation.SlideShowWindow.Height = ActivePresentation.SlideShowWindow.Height - 1
    ActivePresentation.SlideShowWindow.Height = ActivePresentation.SlideShowWindow.Height + 1
    

    Edit
    I tried refreshing the slide as proposed here, but this didn't worked for me.

    Dim lSlideIndex As Long
    lSlideIndex = SlideShowWindows(1).View.CurrentShowPosition
    SlideShowWindows(1).View.GotoSlide lSlideIndex
    

    Edit 2
    I uploaded my file: Download

  • Inarion
    Inarion almost 5 years
    Thanks for your solution! It worked quite flawlessly for me.
  • C. Binair
    C. Binair almost 4 years
    This works for me as well, but is gives me a bit of a flicker. Is this not the case for you?