I have a VBA macro that I wrote and used successfully in PPT2000. It toggles the size of a shape from near full screen to about an inch wide. I use the macro in a slideshow presentation to optionally popup an image or unreadable text box and put it back
after showing. I do this in the standard way by creating an action on the shape to run the macro when clicked.
Since moving to PowerPoint 2010, the macro still works, but it has a disturbing side effect - it resets the animation in the slideshow to the start of the current slide. So, if I have animated and clicked through several lines of text and then clicked
on the shape, the macro runs, but the lines of text disappear and shows the enlarged shape on a slide with just the title up top. When I click on the shape to put it away, the slide is back at the entry point and I need to click through the text I had already
shown. If I make the mistake of animating the shape itself, the macro runs to enlarge it, but then it disappears (because the animation has been reset). When I click through the presentation, it appears, enlarged, in order.
Does anyone know what's going on here? In Powerpoint 2000, this ran perfectly. I could have multiple images or other shapes on a slide with this action, I could pop them up at any time in any order without disturbing the ongoing presentation. I suspect
that there is a setting in PPT2010 that I don't know. I don't think the problem is in the macro, but I have pasted the VBA below.
Sub full_shape_toggle_large(oShp As Shape)
'Modified for PPT2010
Dim loctop, locleft, codenum, ratio
'use specific screen location to signal a reduction
If oShp.Top = 54 Then
'modify scale factors (were 0.25 in PPT 2000)
oShp.ScaleHeight 0.5, False, msoScaleFromBottomRight
oShp.ScaleWidth 0.5, False, msoScaleFromBottomRight
'pull coded original image location from Alt Text
codenum = oShp.AlternativeText
loctop = Int(codenum / 1000000)
locleft = codenum - (1000000 * loctop)
oShp.ZOrder (msoSendToBack)
oShp.Top = loctop
oShp.Left = locleft
Else 'not at top of screen, must be an increase
loctop = oShp.Top
locleft = oShp.Left
'code and store away the image location
codenum = 1000000 * Int(loctop) + locleft
oShp.AlternativeText = codenum
'make sure it's on top
oShp.ZOrder (msoBringToFront)
oShp.LockAspectRatio = msoTrue
'account for different image aspect ratios
ratio = oShp.Width / oShp.Height
If ratio > 1.33 Then
oShp.Width = 647
Else
oShp.Height = 484
End If
'locate the enlarged image up top
oShp.Top = 54
oShp.Left = 27
End If
End Sub
Thanks,
John