Getting Started with Macros: How to Turn on and Use the Developer Ribbon in PowerPoint (or any MS Office tool)

macro iconMacros can be very useful but often go unused. Having always been somewhat of a hack, I do not like to take no for an answer. Macros have helped me work around problems which seemed unsolvable.

Although this post does not contain a single macro file, I plan to write a few posts about specific macros to make an instructional designer’s job a little easier. I will be focusing on PowerPoint as the venue for these macro blog posts, but you can use this info to use Macros in most of MS Office.

In this post, I will cover a few macro basics:


What is a Macro?

According to dictionary.com, a macro – short for macroinstruction – is an instruction that represents a sequence of instructions in abbreviated form (http://dictionary.reference.com/browse/macro). An example of a real-world macro would be going to work. If my abbreviated form, macro statement is going to work, then my sequence of instructions would really be:

  • Gather work items
  • Open car door
  • Close car door
  • Put on seat belt
  • Place key in ignition and turn
  • Place car in reverse
  • etc, etc, etc, until I arrive at work

Someone will ask me to perform the going to work command instead of telling me each and every step of going to work. At the end of completing the instruction going to work, my physical appearance at work is proof that the macro ran successfully. If I did not make it to work, then going to work failed, and “troubleshooting” ensues 🙂

Macros are pretty much the same thing. A macro can type for you, add objects, set formatting, open files –  essentially anything you can do on a computer, a macro can redo for you. They can be simple commands (1. copy; 2. paste; 3. move down one line), or they can be complicated – capable of making decisions based on data you provide.

(back to top)

The Macro File Type

notepad macro example

This is a macro in Notepad.

A file with the .bas extension can be opened in PowerPoint and run as a macro. Macros are written in any text editor – I usually use Notepad. When done with my text file, I change the extension from .txt to .bas.

Not a programmer? No worries! Part of the beauty of macros is the ability to share them. You will likely find little snippets of code online, and you will be copy/pasting them into Notepad or some other text editor (or directly in the Visual Basic editor). However, please be cautious about where you get macros! They can be used for good as well as for evil. The same way you would not eat food found on the street, you should use caution when finding macros online.

(back to top)

How Do I Use Macros in PowerPoint?

Macros can be run from the Developer ribbon in PowerPoint (or Word or Excel). If you already have a macro, here are the steps to run it (see a short video clip here).

developer ribbon

Developer Ribbon in PowerPoint

  1. Click the Developer Ribbon in PowerPoint
  2. In the Code section, click the Visual Basic button
  3. In the window that opens, click
    macro window

    Macro window

    File > Import File…

  4. Find and open your macro file
  5. Close the Microsoft Visual Basic Window (use the X in the top-right corner)… you will be returned to PowerPoint
  6. From the Developer Ribbon, click Macros
  7. With your macro selected, click Run

When you try to save your presentation after using a macro, you may be prompted to save it as a .pptm file. However, this can be considered undesirable. Do you need to do this? The short answer is no. You can simply Save As a .pptx.

In my opinion, there are two good reasons to save as a .pptm, and both must be true:

  1. Can you share .pptm files? Some IT Departments will restrict these file types, because they can be used by bad people to do damage to your computer. If you can’t save a .pptm file, you can likely still save your finished work as a .pptx file.
  2. Are you and your team okay with using a .pptm? File types can be confusing, and some people may be wary to open the file, and some software (like web conferencing applications) will not recognize a .pptm as a PowerPoint file. Do your research first!


Help – Where Is My Developer Ribbon!

If you found that you got stuck above at Step 1: Select the Developer Ribbon because the ribbon isn’t there, don’t fret (yet…)!  Unless you are on IT lockdown, you can enable your Developer ribbon using the steps below (you can also view a short video here):

  1. Click the Office Button

    enable developer ribbon

    Where to turn on your developer ribbon.

  2. Select PowerPoint Options (lower right corner)
  3. Make sure there is a check in the box next to “Show Developer tab in the Ribbon”
  4. Click OK

Note that this setting may be hidden, grayed out, or made unavailable due to your IT Department’s security policies. If this is the case, please reach out to your IT Department for further assistance.

(back to top)

[CYA] Disclaimer 🙂

Perception of macros are pretty broad, and sometimes the unknowing person can make them sound like they pose a devastating threat, akin to leaving your keys in your car, with all the windows open and a sign that says “STEAL ME!”.

Generally, people can do bad things with macros, but if you are not looking to do bad things, nothing I ever tell you or show you will ever get you into trouble, break PowerPoint, or make you lose data. However, macro security is important. Do not use macros from untrusted places or sources. I will show you how to build macros, and if they do not work, they simply stop running. If you stray from my steps, risk-wise, you are on your own… but I encourage calculated curiosity and do wish you lots of luck!

(back to top)

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s