What is a Macro?

You might have downloaded an Office template and received a prompt to enable macros. You might also have noticed that the prompt also comes with a warning that enabling macros can be harmful for your computer. But macros aren’t exclusive to Microsoft Office files, as a macros are widely used by programmers around the world for various programming related tasks. In this post we will take a look at what is a macro, with specific emphasis on Microsoft Office files.

What is a Macro & What is it Used For?

A macro is simply a pattern that specifies how a sequence of functions are to be performed. A simple explanation for a lay user would be that macros are used to automate tasks to make software less repetitive in its functions. There are a plethora of ways in which macros are used, ranging from use in Word, Excel and PowerPoint files to sequencing of mouse and keyboard strokes, as well as use in C and assembly (programming) languages.


Macros in Microsoft Office Applications

Macros in Microsoft Office applications like PowerPoint, Word and Excel are used to automate different functions to make it easier for end users to perform certain tasks or to display different types of content. Macros for Office applications are written using a programming language called Visual Basic for Applications (VBA).

If you’re still confused about what a macro can do in an MS Office file, then here is an example. Let’s say, you downloaded an animated PowerPoint template which might require enabling macros. In such a case when you enable macros, the template might play-out animations in a set sequence automatically. Similarly, you might download a macro-enabled Excel template which automatically fetches your calendar from the Exchange Server. The point is, macro based files perform certain functions in a set sequence, and can be quite handy for automating certain tasks in MS Office applications.


Macro File Extensions for MS Office Applications

Here is a list of Macro-based file extensions for PowerPoint, Word and Excel.

  • MS PowerPoint: POTM, PPTM & PPSM.
  • MS Word: DOCM, & DOTM.
  • MS Excel: XLAM, XLSM and XLTM.

Note: certain file types like PPTX might also contain macros but the macros in such files aren’t executable. For a detailed overview of file format references, see this Microsoft guide on Office file formats.


Can Microsoft Office Files with Macros be Dangerous?

A short answer to this questions would be, yes. Since macros execute a set of tasks, these can very well be used to introduce malware on your computer. This is why a warning message is displayed when you are prompted to enable macros in your Office applications.


Should You Use PowerPoint, Word & Excel Files with Macros?

While macro-enabled files can be dangerous, there are a plethora of handy Office templates that use macros. Not to mention, using PowerPoint scripts and macros is essential for many developers working hard to provide third-party resources for making Office applications better. Hence, using macro-enabled files isn’t all that bad, provided you download them from a reliable source and take necessary precautions such as scanning them for viruses, before enable macros.


How to Enable or Disable Macros in PowerPoint, Word & Excel

While you can easily enable macros for various macro-enabled files by simply clicking on the prompt that usually shows up, you can further customize your macro settings in PowerPoint, Word & Excel (2016) by going to; File –> Options –> Trust Center –> Trust Center Settings-> Macro Settings. From here, you can enable or disable macros and even allow them only for digitally signed files.


How to Create Your Own Macros in PowerPoint, Excel & Word

Here is a guide to how you can create your own macros in PowerPoint, Word & Excel. While macro-enabled files require knowledge of VBA, we have tried to provide an easier method for each application by explaining about the macro recording functionality that can help even novice users automate their repetitive tasks.

Microsoft PowerPoint

Macros in PowerPoint can be created by starting the process (in PowerPoint 2016) via View –> Macros. However, you will require programming knowledge and proficiency in VBA to create macros in PowerPoint. Here is a small guide regarding the use of the Macro recording tool for PowerPoint, which existed in earlier versions and can help you create macro-enabled files which might be usable with newer editions.


Microsoft Excel

While there is no easy way for a non-programmer to create macro-enabled files for PowerPoint, the job is much easier in Microsoft Excel. There is a built-in macro recorder to record repetitive tasks. You can do this (in Excel 2016) by going to View –> Macros –> Record Macro. This will record all the tasks you perform from there onward. Once you are done with the task, go to View –> Macros –> Stop Recording to stop the recording process. You can run your macro from the Macros menu anytime to perform the recorded function.


Microsoft Word

Fortunately, you can record macros in Word using a macro recording tool similar to the one in Excel. You can access this tool (in Word 2016) via View –> Record Macro. This will allow you to record certain tasks that you can repeat by simply running your saved macros.


Many end-users probably enable macros without a second thought when using macro-enabled Office files. We hope our guide helped you to not only better understand what is a macro, but to also appreciate the hard work many programmers put in to use macros to make Office applications more powerful. We also hope the macro-recording tool will help you make life easier, by automating your repetitive functions in Office applications.

About Farshad

IT professional, communications specialist and Blogger!

Leave a Comment

Your email address will not be published. Required fields are marked *