# Powerpoint Macro Question

**URL:** <https://boards.straightdope.com/t/powerpoint-macro-question/224623>\
**Category:** Factual Questions\
**Created:** [January 15, 2004, 6:56pm UTC](https://boards.straightdope.com/t/powerpoint-macro-question/224623 "2004-01-15T18:56:49Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![markle9](https://avatars.discourse-cdn.com/v4/letter/m/f9ae1b/32.png) [@markle9](https://boards.straightdope.com/u/markle9)\
**Post date:** [January 15, 2004, 6:56pm UTC](https://boards.straightdope.com/t/powerpoint-macro-question/224623/1 "2004-01-15T18:56:49Z")

</div>

I was wondering if there was a way to create macros that would  
then be available to you all the time in Powerpoint – not just when you’re  
in a particular file.

I know how to do it in Word – you put the macro in the Normal.dot  
template. In Excel, you put the macro in Personal.xls which is always  
open but hidden.

But is there a way to do this in Powerpoint? I think it might have something  
to do with add-ins, but perhaps a Doper might be able to point me in  
the right direction.

Thanks!

Mark

---

<div class="post-metadata">

**Author:** ![Morbo](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/morbo/32/389_2.png) [@Morbo](https://boards.straightdope.com/u/Morbo)\
**Post date:** [January 15, 2004, 9:20pm UTC](https://boards.straightdope.com/t/powerpoint-macro-question/224623/2 "2004-01-15T21:20:04Z")

</div>

Yes, it has to do with Add-Ins. In older versions you could place it in your Blank Presentation.pot file, but for security reasons we disabled that in later versions.

You have to save the code as a PowerPoint Add-In (PPA) file, then place that Add-In in your Startup folder. When you relaunch PPT it will load the Add-In and make it available for launching when you go to Tools | Add-Ins. Further, if you name the Add-In “Auto\_Open” it will execute automatically when you launch PPT. This works in both Win and Mac PPT.

Hope this helps…

---

<div class="post-metadata">

**Author:** ![markle9](https://avatars.discourse-cdn.com/v4/letter/m/f9ae1b/32.png) [@markle9](https://boards.straightdope.com/u/markle9)\
**Post date:** [January 15, 2004, 11:04pm UTC](https://boards.straightdope.com/t/powerpoint-macro-question/224623/3 "2004-01-15T23:04:46Z")

</div>

Dooku –

Thanks for you help. I did exactly what you said (I thought)  
but it’s still not working.

Here’s where I stand:

I started a blank presentation and recorded a simple macro. I saved  
the blank presentation as an add-in, with the name Auto\_Open.ppa  
in my C:\Program Files\Microsoft Office\Office\STARTUP directory.

The macro is there, because the first time I tried to load the add-in  
I got the Disable Macros/Enable Macros warning. The add-in loads  
automatically when I launch Powerpoint now. But it’s as if the macro  
isn’t there. It doesn’t appear in the macro list (nothing does) even  
if I choose to look in All Presentations. The button on the toolbar that  
I linked to the macro doesn’t work. Launching the Visual Basic editor  
doesn’t help, it doesn’t appear there, either (only the open presentation  
does).

What am I doing wrong?

I really appreciate your help.

Thanks,

Mark

---

<div class="post-metadata">

**Author:** ![Morbo](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/morbo/32/389_2.png) [@Morbo](https://boards.straightdope.com/u/Morbo)\
**Post date:** [January 15, 2004, 11:54pm UTC](https://boards.straightdope.com/t/powerpoint-macro-question/224623/4 "2004-01-15T23:54:19Z")

</div>

Ah - I definitely wasn’t clear. The Module is what you need to name auto\_open. Try this:

Launch PPT  
Tools | Macro | VBE  
Insert | Module

in the module:

Sub auto\_open ()  
msgbox “Mark is King”  
End Sub

Close and return to PPT  
File | Save As  
Choose any filename and any location save as PPA  
Tool | Add-Ins | New  
Browse to wherever you saved the PPA, select it

**It should now be loaded and ready every time you Quit and Restart PPT.**

(This is easier than copying it to the startup folder manually, I should have mentioned it the first time). Now if you don’t want it to auto load, you can go to Tools | Add-Ins and deselect it, then choose to Load it as needed.

One more thing: If you don’t see the PPA loaded after going to Tools | Add-Ins, your security is too high - goto Tools | Macro | Security and change it to Low.

---

<div class="post-metadata">

**Author:** ![markle9](https://avatars.discourse-cdn.com/v4/letter/m/f9ae1b/32.png) [@markle9](https://boards.straightdope.com/u/markle9)\
**Post date:** [January 16, 2004, 1:08am UTC](https://boards.straightdope.com/t/powerpoint-macro-question/224623/5 "2004-01-16T01:08:31Z")

</div>

Okay, that did work, but I think this time I’m the one not being clear.

This is for my work. I want to write macros for people to use while  
they’re in Powerpoint. Like for instance a macro that just prints the  
page they’re working on. I know how to write the macro. I just  
don’t know how to store it in such a way that it’s available to  
people to use, whenever they want it, in all presentations.

The auto\_open thing in your last post worked, but as you know it  
just works upon open. I couldn’t even get it to work again afterwards.  
So how would I get a macro named PrintPage, say, to be available to me,  
anytime I wanted in, in any presentation?

Sorry to be a bother, but this will be a great help to us all if I can figure  
it out.

Grazie,

Mark

---

<div class="post-metadata">

**Author:** ![Morbo](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/morbo/32/389_2.png) [@Morbo](https://boards.straightdope.com/u/Morbo)\
**Post date:** [January 16, 2004, 7:54pm UTC](https://boards.straightdope.com/t/powerpoint-macro-question/224623/6 "2004-01-16T19:54:18Z")

</div>

If you don’t want it to auto load, just call the module something else, (Sub Foo () or something), make sure their security is set to low, then have them go to Tools | Add-Ins and browse to wherever the PPA is shared. It will now be loaded whenever they start PPT but not run. If you want them to launch PPT and have it add toolbar buttons or menu items automatically such that the code will execute when the menu item or toolbar button is enabled, this is how to do it.

---

<div class="post-metadata">

**Author:** ![markle9](https://avatars.discourse-cdn.com/v4/letter/m/f9ae1b/32.png) [@markle9](https://boards.straightdope.com/u/markle9)\
**Post date:** [January 17, 2004, 12:25am UTC](https://boards.straightdope.com/t/powerpoint-macro-question/224623/7 "2004-01-17T00:25:19Z")

</div>

Hmmm…I think the problem is that, at work, we have an older version  
of Powerpoint. We’re using Powerpoint 97, still. Would you believe.  
With Windows 2000. I know it’s out of date, but that’s what I have  
to work with.

Anyway, in this version, there is no Tools | Macro | Security.

When I try to open an Add-In to edit it, it just loads it. So  
I have to start from scratch each time. I can make an add-in,  
I can put a macro in an add-in, I can get the add-in to load  
each time – but the macro doesn’t show up anymore.

I’ve already tried putting a macro in my Blank Presentation.pot,  
but that doesn’t seem to work either.

I’m starting to think there’s just no way to do this. Dooku,  
thanks for your help and sorry to be a bother.

Mark
