VBA PowerPoint 2003 Events for Global Template

G

Guest

Hi,

I have a PowerPoint template that is to be used throughout our office to
generate new presentations. With this template I would like certain things to
happen when certain Events are triggered (i.e. hide a text box on slide 1
when a Slide Show Begins or when the Presentation is printed and then unhide
the text box when the Slide Show has ended.

I can write the code to do these tasks, but I'm having difficulty automating
tihs through Events. In Word & Excel it is so straight forward. I don't
understand why it is so confusing in PP.

I have read that in order to work with Events in PP I must store the code in
an Add-in.
So I save my .pot as a .ppa file... but I am not sure where to put
additional code in order to get this .ppa file to load automatically.

I've tried using this stmt to automatically load the add-in, but it doesn't
do anything.
Where should I be storing this?

addins.add ("C:\...\MyAddin.ppa").loaded = msoTrue but it doesn't do anything.

I've tried using Auto_Open procedures, but it doesn't do anything.

Also, it seems that most automation that I read about is just general to the
application. I want to automate these tasks only for new or existing files
based on a specific template.

I have googled this backwards and forwards, and have only gotten totally
confused. I even purchased sample code, but it didn't tell me much of
anything.

Any help would be so appreciated!

Thank you!!
 
G

Guest

Actually I did that the first time around, but could never get the toolbar to
open automatically... that is why I was looking into using Events. Anyway,
it's funny that you say that because I decided to try that route again, and
have a separate post called "VBA PowerPoint 2003 - Add-ins" that I just added
a few minutes ago.

I'll include it here:

I have a couple questions:

First some background...I have a PowerPoint add-in that loads up a
custom toolbar with a few buttons. It is comprised of a single Module with 2
procedures...

Sub Auto_Open ()
- code that generates toolbar and icons(Button1)
End Sub

Sub Button1()
- code behind Button1
End Sub

I have changed my Registry in order to install the add-in so that it appears
in my Add-in window in PP (Tools > Add-Ins). I am doing it this way, as I am
planning on distributing this add-in to all of our users.

My toolbar pop-up code is stored in the Auto_Open routine so that it will
appear automatically when the add-in is loaded. However once I have
checkmarked the Add-in to load it into PP, the toolbar doesn't appear
automatically. I still have to manually open it (Tools > Customize).

Question: Am I missing a step???

Also, I keep seeing a lot of code to automatically install and load PP
add-ins...

Question: Where should this code reside? addins.add("c:\MyAddIn").Loaded =
true

Question: I really only need this toolbar for presentations based on a
specific template (new or existing presentations). Can I attach this add-in
just to a specific template, so I can then test for that template before
having the add-in even load?

Thank you!
 

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