How to record which objects a user clicks on

  • Thread starter Thread starter Laura
  • Start date Start date
L

Laura

Hi,

New to the forums here. I would like to know how to track which
objects a user clicks during a powerpoint presentation. I realize this
will probably require a macro and that is where I need help. I'm
fairly tech savvy, but I don't know how to program in VB.

Whenever there is a mouseclick on an object in the slideshow, I would
like two things to happen:
1) Advance to a particular slide (which I see can be set easily in the
program)
2) Write data, to a separate file (it can be a text file), that
reports which object was clicked. This would happen in the background
so the user is not aware of it. This file ideally would keep a log of
whatever objects were clicked within that entire presentation and then
of course be saved upon exit. It would be nice, also, if a new log
file was generated each time the presentation was run.

Is this possible? Or would it be better to consider another kind of
presentation medium for my needs?

Thanks!



..
 
What you want to do is actually fairly easy with VBA. However, VBA has a
pretty steep learning curve. You can get more information about
programming in VBA at

http://www.pptfaq.com/

Click on the Programming PowerPoint link.

There are basically three parts to what you want to do:

(1) Identifying the button
(2) Writing to a file
(3) Hyperlinking to another slide

For #1, when you write a macro, you can use the form:

Sub MyMacro(oShp As Shape)
....
End Sub

The stuff in parentheses, means that whatever button is clicked to run
the macro will be assigned to the variable oShp. From there you can get
information about the button such as the text on the button with
oShp.TextFrame.TextRange.Text.

For #2, I have some examples of writing to text files in the More Tricks
section of my Web site:

http://www.PowerfulPowerPoint.com/

Just click on More Tricks and look at Examples 1 and 2.

Finally, #3 is easy (although by having different buttons link to
different places, you might need a macro for each button; the rest could
be done with one simple macro. All you need is:

ActivePresentation.SlideShowWindow.View.GotoSlide ##

Where ## is replaced by the slide number you want to go to.

So, the basic thing you want to do is quite easy, but I'm sure you will
think of features that you want with this that will make it a bit more
challenging.

--David

--
David M. Marcovitz
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/
Microsoft PowerPoint MVP
Associate Professor, Loyola University Maryland
 
Back
Top