• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Creating Macros

11.7. Can I Autorecord a Macro Like I Can in Word or Excel?

Many Microsoft products, including Excel, Word, and Visual Studio, enable you to automatically record a macro from your mouse and keyboard activity. For example, you simply tell these products to start recording, you perform the action you want to accomplish, and then you click an option to signify that you're finished. You then name the macro, and it's added to your list of custom-made macros. From that point forward, you can either run the macro as is or open the editor and modify it. Unfortunately, Outlook 2003 does not provide a nonprogrammatic means of creating macros. In other words, even when you're simply attempting to automate a task you perform quite a bit, you'll need to write the macro code manually. If you're a “glass half full” type of person, the advantage is that by learning how to manually create and code macros, you'll learn to take complete control over your Outlook environment and will know how to write macros for other Office products as well.

11.8. How Do I Create a Macro?

Almost every book that introduces a new programming language starts out with the canonical “Hello World” example. We'll change this just a bit so that instead of merely displaying static text, our version displays the current user's name. That way, although the macro is still very simple and doesn't take focus from the main subject of this FAQ (the steps required to create a macro), at least when you're done you will have also learned how to retrieve the current user, which is something you will probably need in other macros.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint