Showing a larger image

C

Chris Grey

Hi All,

I am trying to add an effect to an image in my presentation. The slide in
question has a number of images that have to be displayed as thumbnail size.
What I would like to do is make a larger image of the thumbnail(s) appear
when the mouse goes over the thumbnail. Is this possible? I am using
PowerPoint 2003.

Thanks in advance
Chris Grey
 
D

David M. Marcovitz

There are a few things that can happen with a mouse over:

(1) A screen tip can be displayed, but this is just a short text phrase.

(2) An action setting can be set to play a sound (not what you want
either).

(3) An action setting can be set to hyperlink to another slide; this
might work if that other slide is a copy of this slide except with the
picture bigger.

(4) An action setting can be set to run some VBA code; this code could
cause a large version of the picture to become visible (or even change
teh size of the thumbnail). This could be made to do exactly what you
want, but it would require VBA, something like the following:

Sub MakeBigger(oShp As Shape)
Dim eachShape As Shape
For Each eachShape In _
ActivePresentation.SlideShowWindow.View.Slide.Shapes
If eachShape.Type = msoPicture Then
eachShape.Width = 200
End If
Next eachShape
oShp.Width = 400
End Sub

Sub MakeSmaller()
Dim eachShape As Shape
For Each eachShape In _
ActivePresentation.SlideShowWindow.View.Slide.Shapes
If eachShape.Type = msoPicture Then
eachShape.Width = 200
End If
Next eachShape
End Sub

What you need is to assign the MakeBigger macro to the MouseOver Action
Setting of all your pictures (changing 200 and 400 to whatever size is
appropriate for you). Then create box that covers the whole slide and
send it behind the the pictures and assign it the MakeSmaller macro (also
as a MouseOver Action Setting).

--David

--
David M. Marcovitz
Microsoft PowerPoint MVP
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/
 
C

Chris Grey

Thanks David, your solution looks good and I would happily use it but for one
thing... I am creating a presentation template for end users who would run
for the hills if I asked them to assign macros to the presentation. Oh well
at least I know how to do it now for myself!

Regards
Chris
 
D

David M. Marcovitz

Isn't procrastination wonderful? I should be doing a bunch of other
things, but I'm having fun with this. It needed an additional line, so
here is the corect code:

Sub MakeBigger(oShp As Shape)
Dim eachShape As Shape
For Each eachShape In _
ActivePresentation.SlideShowWindow.View.Slide.Shapes
If eachShape.Type = msoPicture Then
eachShape.Width = 200
End If
Next eachShape
oShp.Width = 400
oShp.ZOrder (msoBringToFront)
End Sub

Sub MakeSmaller()
Dim eachShape As Shape
For Each eachShape In _
ActivePresentation.SlideShowWindow.View.Slide.Shapes
If eachShape.Type = msoPicture Then
eachShape.Width = 200
End If
Next eachShape
End Sub

Note the oShp.ZOrder line that makes sure that the big picture is in
front of all the other pictures.

--David

--
David M. Marcovitz
Microsoft PowerPoint MVP
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/
 
D

David M. Marcovitz

I understand where you are coming from. But you might be surprised. If
you give them clear instructions, assigning a macro to something isn't
that hard. If you are creating the template, it's not like they have to
write the macros ("Run for the hills!") themselves. I would be more
concerned about the end users being able to run presentations with macros
(that means no PowerPoint Viewer, no Web, and macro security must be set
to medium or low). As far as I can tell, it might be your only solution
without making a new slide for each picture. Of course, if you're willing
to click, then trigger animations will do the trick.
--David

--
David M. Marcovitz
Microsoft PowerPoint MVP
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/
 
C

Chris Grey

Hmm, procrastination? I must now put off what I should be doing while I
ponder on the meaning of the word procrastination. Seriously though I should
have added that the template is designed to use IIW to insert the images and
the current version of that doesn't support inheritance of Action Settings.
Still, one for the old toolbox if IIW incorporates this feature.

Thanks
Chris
 
D

David M. Marcovitz

A quick macro could easily be written to assign the Make Bigger macro to
all the images, but that might scare your users even more.
--David

--
David M. Marcovitz
Microsoft PowerPoint MVP
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/
 
C

Chris Grey

Now that would be an interesting solution. If I could write a macro that
could assign the make bigger macro attach to the imported images and assign
it to a button on the template so that they run IIW and then click on the
macro button they wouldn't need to be scared (I'll be setting up their
machines with the template, etc. because I have already writton one macro for
them that will need to be put in place). Could you tell me how this can be
achieved, given that the the images I want to give the ability to grow on the
mouse over even will be variable each time)?

Thanks
Chris
 
D

David M. Marcovitz

I'm running out of procrastination time. It would be something like:

Sub AssignMakeBigger()
Dim oSld As Slide
Dim oShp As Shape
For Each oSld in ActivePresentation.Slides
For Each oShp in oSld.Shapes
If oShp.Type = msoPicture Then
oShp.ActionSettings(ppMouseOver).Action = _
ppActionRunMacro
oShp.ActionSettings(ppMouseOver).Run = _
"MakeBigger"
End If
Next oShp
Next oSld
End Sub

I haven't tested this, but the theory is that it selects every picture on
every slide and assigns the MakeBigger macro to the picture. I'm sure
there is something wrong with this because I didn't test it, but you get
the idea.

--David
--
David M. Marcovitz
Microsoft PowerPoint MVP
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/
 
C

Chris Grey

Thanks for using up your procrastination time, a rare commodity I'm sure. I
will certainly give this a go.

Regards
Chris
 

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