how to create a macro in powerpoint
TRANSCRIPT
7/29/2019 How to Create a Macro in PowerPoint
http://slidepdf.com/reader/full/how-to-create-a-macro-in-powerpoint 1/8
How to Create a Macro in PowerPoint
PowerPoint 2007 - Windows
21 May 2009, by Virinia Smith
This lesson will show you to create a macro in PowerPoint. Macros let you simplify tasks that ordinarily
require many keystrokes or commands, such as creating a header or footer, or changing line spacing
and indents for a paragraph. Once you record a macro, you can run it at any time to repeat the
recorded actions. You can use macros for tasks as simple as opening and printing a document, or for
more complicated tasks such as creating a new document, inserting a table, entering text, and applying
an AutoFormat. Macros are a great tool for saving time and eliminating errors.
The macro recorder is not available in Microsoft Office PowerPoint 2007. Instead, you can use Visual
Basic for Applications (VBA) to create or edit macros.
Access the Developer Tab
Click on the Office button in the left hand corner of the window. Then click PowerPoint Options.
How to Create a Macro in PowerPoint - 1
7/29/2019 How to Create a Macro in PowerPoint
http://slidepdf.com/reader/full/how-to-create-a-macro-in-powerpoint 2/8
This will open the PowerPoint Options. Select the Popular category, and then place a check in the
box next to Show Developer tab in the Ribbon. Click OK to continue.
The Developer tab should now be visible.
Enable Macros
By default, PowerPoint 2007 is configured to disable all macros to avoid contracting a virus from an
unknown source. However, you should not worry about using a macro from a trusted source. Just
remember to use an antivirus program to scan macro files before using them. To enable macros, click
on Macro Security in the Developer tab.
How to Create a Macro in PowerPoint - 2
7/29/2019 How to Create a Macro in PowerPoint
http://slidepdf.com/reader/full/how-to-create-a-macro-in-powerpoint 3/8
Adjust the Macro Security Settings
Once you click on the Macro Security button, a Trust Center window should appear. Make sure the
Macro Settings button has been selected. Check the boxes next to the options Enable all macros an
Trust access to the VBA project object model. Click OK when finished to exit the window.
If you're still concerned about contracting a virus, and you plan on viewing several third-party
presentations that contain macros, you can narrow down which macros will run by selecting Disable a
macros except digitally signed macros instead of Enable all macros. This will offer some security
when dealing with third-party macros, but it still should not be used as a replacement for scanning
macro files for viruses, but as an additional tool to help you judge the validity of the file.
How to Create a Macro in PowerPoint - 3
7/29/2019 How to Create a Macro in PowerPoint
http://slidepdf.com/reader/full/how-to-create-a-macro-in-powerpoint 4/8
Save as a Macro-Enabled Presentation
Click on the Office button and choose Other Formats under Save As. A shortcut to access this option
is pressing the F12 key.
How to Create a Macro in PowerPoint - 4
7/29/2019 How to Create a Macro in PowerPoint
http://slidepdf.com/reader/full/how-to-create-a-macro-in-powerpoint 5/8
When the Save As window appears, select PowerPoint Macro-Enabled Presentation from the
drop-down list next to Save as Type. Click Save to continue.
View Macros
Open the Developer tab and click on the Macros button.
How to Create a Macro in PowerPoint - 5
7/29/2019 How to Create a Macro in PowerPoint
http://slidepdf.com/reader/full/how-to-create-a-macro-in-powerpoint 6/8
Name your Macro
When the Macro screen appears, you will need to give your macro a name. It is also a good idea to
give a short description of the macro for future reference. Click Create when you are finished and the
Visual Basic Editor Window will appear on your window.
Write the Macro Code
Any commands you want the macro to perform should be typed or copied in between these lines (the
Sub and End Sub commands). Ignore the green text; this is not a specific command but text that has
been commented out.
You can paste macros that have already been made from the internet or you may follow the steps
outlined below for creating a basic macro.
How to Create a Macro in PowerPoint - 6
7/29/2019 How to Create a Macro in PowerPoint
http://slidepdf.com/reader/full/how-to-create-a-macro-in-powerpoint 7/8
Write "Active Presentation."
To begin with, type "Active Presentation." As soon as you hit the period key, a list of options should
appear. Either try typing the action you would like performed or browse through the list to find it. Here,
we choose the action SaveAs.
Give the File a Name
In this particular task, you will need to give the file a name and type. First, type a quotation mark to
enclose the file path name. Here, the "c" stands for the hard drive, "tutorial," the file name, and "html,"the file type. After you enclose the file name with quotation marks, type a comma and a dropdown list
will appear. In this case, since we are creating a macro that will save as an html file, we will want to
select ppSaveAsHTML. Finally, type a comma and select msoTrue.
Finish and Save
The code for your macro should now look something like this. More tasks may be included in a single
macro and have many lines of commands. Once you are done writing your macro code, save the file by
either pressing Ctrl + S or choosing the Save option from the File menu on the Visual Basic Editor
toolbar.
How to Create a Macro in PowerPoint - 7
7/29/2019 How to Create a Macro in PowerPoint
http://slidepdf.com/reader/full/how-to-create-a-macro-in-powerpoint 8/8
Exit the Editor
After saving, you can exit the editor by pressing Alt + Q or selecting Close and Return to Microsoft
PowerPoint from the File menu.
How to Create a Macro in PowerPoint - 8