Changing Master Objects to visible and back

J

JimS

I hope I can fully explain my predicament:

I have created code to turn on and off objects (shapes and pictures) in the
Master based on the user clicking on an object connected to my macro, which
also sends the user to a subsequent slide. I also have another clickable
object which will send the user back to a previous slide. I have both of
these clickable objects on each slide.

Certain objects in the Master will be hidden when invoking the macro to
advance to the next slide. Then these same objects are supposed to become
visible when invoking the macro again. However, they remain hidden - but in
Presentation Mode only! When I return to Normal view, those objects are
visible. In Presentation Mode, they become visible when moving on to the next
subsequent slide. But this only happens when the user first clicks on the
object that sends them back to a previous slide first. I am using PowerPoint
2007.
Thanks for any help on this. I've tried a lot of trial and error to
pinpoint the error, but I'm finally stumped!

Here's a bit of the macro to help understand what I'm doing:

Dim CurSld As Integer

'This has to be run in slide show view!
CurSld = SlideShowWindows(1).View.Slide.SlideID

Select Case CurSld.
..
..
..
Case 271 'Invoked while on slide 15
With ActivePresentation.Slides(1).CustomLayout.Shapes
.Item("MyObject").Visible = msoFalse
End With

Case 272 'Invoked while on slide 16
With ActivePresentation.Slides(1).CustomLayout.Shapes
.Item("MyObject").Visible = msoTrue
End With
..
..
..
Select Case CurSld
Case 271 'Invoked while on slide 15
With SlideShowWindows(1).View
.GotoSlide 16
End With

Case 272 'Invoked while on slide 16
With SlideShowWindows(1).View
.GotoSlide 17
End With
..
..
..
 
D

David M. Marcovitz

I have a few questions for you. I have seen this before in 2003 and
earlier, but I haven't worked much with 2007.

(1) Is the code to jump to the slide before or after the code to make
the objects visible or invisible? I have seen this more on Macs than in
Windows, but sometimes changing the visibility of a shape doesn't have
an impact until the slide refreshes. This can be achieved by GotoSlide
and even going to the same slide.

(2) Do you have any animated GIFs on the slide or the slide master? In
2003, these tended to cause problems for changing the visibility of a
shape, but the problems were not always consistent.

(3) Do you have any custom animations on the slide or the slide master?
These also could cause some problems.

--David
 
J

JimS

David:
The objects are made visible first, then the go to next slide. The strange
thing is, the object does correctly appear after making the jump if the user
doesn't first go back to a previous slide using a different navigation
button.
I don't have any animated gifs or animations going of any kind. (I thought
this may have been the problem before, but it wasn't).

However, I will try refreshing the slide by using a gotoslide <same slide>
command.
I'll let you know if this works.

Thanks!
Jim S.
 
J

JimS

I tried the gotoslide <same slide> technique, but that didn't help.
Interestingly, though, I tried running this code in PowerPoint 2003. It
doesn't recognize the "Custom Layout" property within
"ActivePresentation.Slides(1).CustomLayout.Shapes" (I guess this is a new
property to 2007?), so I changed it to the "Master" property, and my problem
did not occur! I tried using the "Master" property back in PowerPoint 2007,
but the problem still existed.
 
D

David M. Marcovitz

How odd. I have to say I'm stumped. Maybe someone else has some insight?
--David
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top