Capturing Slide Events in a Presentation.

O

Offace

Hello PowerPoint Newsgroup,

I have (with great thanks to Google) a PowerPoint 2007 SP2 Presentation (*.pptm
file) that, is able to capture Slide change event using an Add In (*.ppam file).
Generally the *.pptm file (being a Market Research tool), contains 4 photos per
slide. That is, the same 4 photos on each slide with a different question. When
the user or presenter changes the slide (hence the question), they want the 4
photos to change the order they are in (something to do with what researchers call
'respondent effects').

All this is fine, I have the VBA procedures that can handle this but, all the code
for this is in the Add-In (*.ppam file). Is it possible somehow to capture the
events from the Add-In (*.ppam file), in the Presentation (*.pptm file)? Such
that the events are defined, captured and raised in the Add-In, and then captured
in the presentation.

If not, is it possible to only upload this Add-In to a specific Presentation?

Please be as technical as required, I have plenty of VBA experience with Excel and
Access, first time with PowerPoint, and nearly lost the legs off my chair when I
went to use PowerPoint's event model, hence my gratitude to Google...
 
O

Offace

Thank you sincerely Steve, I think I'll place the code in the PPTM Presentation
file. There would not be a problem to ask the users to enable macros on opening
the presentation. Thanks again for your response and clarification Steve,
hopefully PowerPoint 2010 will have a 'more' exposed event model,



| > Hello PowerPoint Newsgroup,
| >
| > I have (with great thanks to Google) a PowerPoint 2007 SP2 Presentation
(*.pptm
| > file) that, is able to capture Slide change event using an Add In (*.ppam
file).
| > Generally the *.pptm file (being a Market Research tool), contains 4 photos
per
| > slide. That is, the same 4 photos on each slide with a different question.
When
| > the user or presenter changes the slide (hence the question), they want the 4
| > photos to change the order they are in (something to do with what researchers
call
| > 'respondent effects').
| >
| > All this is fine, I have the VBA procedures that can handle this but, all the
code
| > for this is in the Add-In (*.ppam file). Is it possible somehow to capture
the
| > events from the Add-In (*.ppam file), in the Presentation (*.pptm file)? Such
| > that the events are defined, captured and raised in the Add-In, and then
captured
| > in the presentation.
| >
| > If not, is it possible to only upload this Add-In to a specific Presentation?
|
| You can capture events in either a PPAM or PPTM. The problem is initializing
the
| event trap in the first place. In a PPAM it's simple: you put it in the
add-in's
| Auto_Open subroutine. Anything there runs when the add-in loads (usually at
PPT's
| startup).
|
| In a PPTM, code doesn't run automatically, so you have to come up with another
means
| of forcing your event init code to run. One possibility: put an action button
on
| the first slide with text like "Click here to begin". The button invokes a
macro
| that initializes the event trap and advances to the next slide.
|
| You don't need to get users to install add-ins in order to make this work but
you do
| need to get them to allow your macro code to run when they get the dire warning
every
| time they open your presentation.
|
| Alternatively, you can put your code in an add-in, but in the event handler,
test to
| make sure it's one of your presentations before doing anything. I'd use tags
for
| this:
|
| ' Set up the presentation ... run this once
| With ActivePresentation
| ' Tags are Name/Value pairs
| .Tags.Add "WhosePressie", "MineMineMine"
| End With
|
| ' And in your add-in's event handler:
| With SlideShowWindows(1).Presentation
| ' If it's not tagged as yours, do nothing
| If Not .Tags("WhosePressie") = "MineMineMine" Then
| Exit Sub
| End If
| ' Safe to continue
| ' Do yer stuff ...
| End With
|
|
|
|
| ==============================
| PPT Frequently Asked Questions
| http://www.pptfaq.com/
|
| PPTools add-ins for PowerPoint
| http://www.pptools.com/
|
| Don't Miss the PPTLive User Conference! Atlanta | Oct 11-14
|
 

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