Macros

A macro is just the name given to a series of keystrokes that can be recorded and then played back in order to automate a task.
These keystrokes are then transferred into a series of commands which can then be rerun at any time.
Macros are simple computer programs where the code is often generated for you.
These macros run completely within PowerPoint and require no additional software.
They can be used to play back your actions and can prevent you from having to perform tedious or repetitive tasks.
Macros can perform specific tasks a lot quicker than they can be done manually and often with greater accuracy.
Automating frequently performed tasks will save you a lot of time and will make you more productive.


What can a Macro do ?

Any task that can be performed manually using the keyboard or mouse, a macro could do.
Using macros enables you to perform repeated tasks much more efficiently than performing individual steps over and over again.
Macros are ideal for performing the same task to several objects, slides or even presentations.
They are commonly used to apply formatting and for manipulating objects.
Macros can also be interactive, requesting information from the user and then taking actions depending on the information obtained.
All you need to do is record your actions the first time you perform the task and then just rerun the macro for all the other times.


How can I create a Macro ?

There are two ways to create a macro. You can either use the Macro Recorder or you can write the commands directly using the Visual Basic Editor.
The Macro Recorder records all your keystrokes (i.e. each individual button pressed) and generates the corresponding VBA code in order to re-create the steps.
When recording a macro you should try and use keystrokes and menu commands. Try and avoid using the mouse as it often doesn't record all the steps.
Using the Macro Recorder is the easiest way to quickly automate your tasks and this tool is very easy to use.
The Macro Recorder is a simple way to perform tasks quickly without actually coming into contact with any code.
Regardless of the method used all the macros are written in VBA.
Once you create a macro you can either run it, modify it or delete it.


Where should I store my macro ?

You need to decide where you are going to keep your macro(s).
If the macro is only going to be used in one presentation then you can store the VBA code in that particular presentation.
If you want the macro to be available in every presentation that is based on a particular template, then you should store the VBA code in the template file ".pot".
You can open the template file using the (File > Open) dialog box and copy the code into it.
If you want the macro to always be available in every presentation that is open, you should store the VBA code in an add-in.
This add-in is then loaded every time PowerPoint is open. It is possible to save a regular presentation file as an add-in.


Shortcut Keys

(Alt + F11) - Toggles between the Word window and the Visual Basic Editor window.
(Alt + F8) - Displays the (Tools > Macro > Macros) dialog box.


What is VBA ?

The term VBA is short for Visual Basic for Applications and is the name of the programming language used to represent the commands.
It is possible to write very complicated macros although these are generally written by dedicated programmers using the Visual Basic Editor window.
This window provides a dedicated environment where you can edit and write VBA code. This window can be displayed by selecting (Tools > Macro > Visual Basic Editor).
It looks very much like a separate application and will appear as an additional window on your status bar.
You can modify all the macros which you create with the Macro Recorder using the Visual Basic Editor window.
The Visual Basic Editor window comes as standard in the majority of the Microsoft Office applications.


© 2017 Better Solutions Limited. All Rights Reserved. © 2017 Better Solutions Limited