sponsored ads

How to Record Macro in PowerPoint

I really have no idea about there was a exclamation mark in macro of developer tab, so that I cannot record macro using Microsoft Powerpoint 2007 . I set my trust center settings: Macro settings: Enable all macro Checked : Trust access to the VBA project object model. ActiveX settings: Enable all controls without restrictions and without prompting. Could anyone help me ? I want to record macro in powerpoint 2007. Thanks in advanced.

sponsored ads

Solution

I suggest creating New Macros in Microsoft PowerPoint 2007


  1. Before we begin, make sure that the Developer tab is visible on your PowerPoint ribbon and that macros have been enabled. If this is not done, refer to Part 1 of this series, and follow the instructions there before continuing.In order for our macros to work after we define them, we’ll first need to save our PowerPoint presentation in a special way. To do this, click on the Office button and choose Other Formats from the Save As category. Alternatively, you could press the shortcut key, F12, on your keyboard to access this option.                                                                                                                                                                       Image:6A72705304FFECE4C0314C84D78C459E358DA228 small.jpg
  2. When the Save As dialog box opens, select PowerPoint Macro-Enabled Presentation from the drop-down list next to Save as Type. Click Save to continue.                                                         Image:518055C3D32C46C3A0107AEBD92B18934857BA8F small.jpg
  3. Now, we’re finally ready to create a macro. Open the Developer tab and click on the View Macros button as shown in the screenshot below.                                                                                                                             Image:1B79504AAC11A9800E4FB7B80DDFAF5F2AFDEE84 small.jpg
  4. This will open the Macro dialog box, which should look familiar to those who used the macro recording function available in previous versions of PowerPoint. The only thing mandatory to do in this box is name your new macro. However, it’s also a good idea to provide a short description of what the macro will do, especially if your memory is as bad as mine. For now, we’ll just give this macro the incredibly descriptive name of TestMacro.                                                                                                                  Image:D35D8D168E89CDB575D842A07C12D03551B89891 small.jpg
  5. After you’ve finished here, click Create to continue. The Visual Basic Editor window will now appear on your screen, with the cursor placed between the lines of code that read as Sub TestMacro( ) and End Sub. Any commands that we want the macro to perform should be typed or copied in between these two lines.                                                                                                                                              Image:C2E598F6E6E38D690B9DBCA00787783DA07066A7 small.jpg
  6. We’ll save more detailed examples of VBA code for later articles in this series, but we’ll go ahead and create a very simple macro here just to illustrate the process. Let’s suppose that we want to write a macro that will save our PowerPoint presentation as an HTML file entitled testfile.html. The VBA code needed for this command is: ActivePresentation.SaveAs "c:\testfile.html", ppSaveAsHTMLv3, msoTrue In the Visual Basic Editor, our macro code will now look like this:                                                            Image:08B22731DACBBF6633700D22191BBE453848716A small.jpg
  7. At this point, we could include additional code if we wanted the macro to perform more tasks, but we'll leave it just like this for now. We can go ahead and save the macro file by either pressing Ctrl+ S or choosing the Save option from the File menu on the Visual Basic Editor toolbar.    Image:875C4024AB56EA643A531DC3474ABE79BD35A109 small.jpg
  8. After saving, we can exit the editor by pressing Alt + Q or selecting Close and Return to Microsoft PowerPoint from the File menu.


       Image:35DFC247485556E0F5318F7A96CA638764950553 small.jpg


Now that the macro has been created, it can be used at any time. Next, in Part 3 of this series, we’ll cover how to run existing macros in PowerPoint 2007.

Tips

See also

Some macros pose a potential security risk that may spread a virus on your computer and you may want to disable Macro, but sometimes you may want to enable Macro to run automatically. Here we'll talk about How to Enable or Disable Macro in PowerPoint.
Have you ever opened your file and got a security warning about a macro? These tips will show you how to enable blocked macro in PowerPoint.
In PowerPoint 2007, presentations with file name extensions that end with an "x" (such as .pptx or .sldx) do not contain macros and cannot contain VBA (Visual Basic for Applications) code. You can follow these steps to save a presentation with VBA Macro in PowerPoint.

Authors

Tagged Add my tag

sponsored ads

Recent Searches

Download this software from AFC

Mp3 AddIn for PowerPoint 1.0

Last Updated: Mar 16, 2011
License: Freeware
Filesize: 1.06MB

Continue to downloadPower by Afreecodec.com