Moveable objects in ppt

G

Guest

moveable objects in ppt

--------------------------------------------------------------------------------

Hi there. Im making an interactive presentation and i have managed to get a
macro that enables the user to pick up an object on screen and move it
around. For example pupils can pick up a french word and place it next to an
image that represents that word.

The problem i am facing is that once the pupils have moved the words into
the correct places powerpoint doesn't reset. Therefore when they come to use
the activity again, the words will already be in the correct place.

I think this is a long shot, but does anyone know if there is a way of
resetting the objects so that after they have been moved they return to their
original place??

Thanks
 
B

Brian Reilly, MVP

I guess that what I'd do is to add tags to each object with the
original .top and .left values in the tag. Then I'd write a short
macro to search through all the shapes on all the slides, example on
my website (reillyand.com) and probably on the PPTFAQ.com site to do
that. Then grab the .top and .left positions from the tags to reset
the position.

If you need more help on this let us know. I've been awake most of the
night and am going bsck to bed now. PPTFAQ.com has lots of examples of
tags via VBA since they are not available through PPT UI.

Brian Reilly, MVP
 
G

Guest

Thankyou very much for your suggestion regarding my queerie. However I'm
afraid i'm not too knowledgeable about macros and I couldn't quite understand
how to do what you have suggested. I had a look on pptfaq.com and read up
about tags but it's all a little to complex for me.
There is no rush to get an answer to the problem so when you have a bit of
free time perhapse we can go through the process.

Thankyou again and hope you get some sleep! :)
 
D

David M. Marcovitz

When you say, "I've managed to get a macro," do you mean that you wrote a
macro, or you found a macro. Exactly how you'd do what you want to do
would depend a lot on the macro you have. If you wrote the macro that you
have, then modifying it to do what you want won't be incredibly difficult
(possibly using the method that Brian outlined). If you just copied
someone else's macro, it could be a lot of work for you to figure out
exactly what the macro is doing and insert new code.

For most of my code, I have a procedure that I name Initialize. This is
linked from a button on the first slide and takes care of all the
housekeeping, such as initializing variables, making objects visible or
invisible, and moving objects back where they belong. If you use Brian's
method, this procedure would search through all the tagged objects and
put them back where their tags say they should be. Alternatively, if you
now which objects you want to move back and where to move them, this
could be hard-coded right in this procedure. For example,

With ActivePresentation.Slides("animals").Shapes("pig")
.Top = 50
.Left = 300
End With

--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/
 
G

Guest

Since this is such a well known macro, I'm assuming you're talking about the
Drag and Drop Macro created by Hans Werner Hofmann / Ute Simon:
http://joedale.typepad.com/integrating_ict_into_the_/2006/10/drag_and_drop_i.html

There is not a way to reset the shape locations without using a VB script,
which Brian and David have given you two methods to achieve the results
you're looking for.

To get started using VB in PowerPoint see:
http://pptfaq.com/index.html#name_For_VBeginners
and
http://www.loyola.edu/edudept/PowerfulPowerPoint/


--
Thanks,
Glenna Shaw
Microsoft PowerPoint MVP Team
http://www.pptmagic.com
 
G

Guest

hi

thankyou for all your replies. I didn't write the macro myself. It was a
macro that I copied from a website, however I'm not sure where I got it from
now which probably means it will make it very hard for anyone to help. I will
have a look at the link that you have given me. Thankyou again and if I need
further help I will let you know.
 
U

Ute Simon

thankyou for all your replies. I didn't write the macro myself. It was a
macro that I copied from a website, however I'm not sure where I got it
from
now which probably means it will make it very hard for anyone to help. I
will
have a look at the link that you have given me. Thankyou again and if I
need
further help I will let you know.

Hi Cheryl,

If it's the macro Glenna mentioned, you shoud find a '(c)oded by' if you
open the macro code in PowerPoint's VBA editor. See if it mentions Hans
Werner Hofman's name. If so, there might be additional information available
for you, though most of it is still in German. Drop me a mail to us "at"
ppt-user.de with detailed descriptions what you have, and what you need to
do, and how much programming experience you have. Please don't forget to
mention your PowerPoint version and OS version.

If the macro has another author, I am afraid I will not be able to help.

Best regards,
Ute
 

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