Taking Shortcuts with Macros in Office 2003

Many people dream of the day they can give orders to a computer by talking to it; the current reality is that you still have to type on a keyboard if you hope to use your computer at all. Because most people would rather avoid typing, Microsoft Office 2003 offers a partial solution — macros.



Macros don't eliminate typing entirely, but they can reduce the number of keys you have to press to get something done. A macro is a mini-program that records your keystrokes as you type. After you record the keystrokes in a macro, whenever you need to use those exact same keystrokes again, you can tell Microsoft Office 2003 to "play back" your recorded keystrokes.



For example, suppose you find yourself typing the name of your company, The Mississippi Mudflat Corporation, over and over again. You can instead type it once and save it as a macro. Then, when you want the company name to appear in your document, Office 2003 can automatically type The Mississippi Mudflat Corporation for you.



You can create and run macros within Word, Excel, and PowerPoint.



When you create a macro in either Access or Outlook, you actually have to write a miniature program in a programming language known as Visual Basic for Applications (or VBA for short).



Recording macros in Word


To record a macro in Word, follow these steps:



1. Choose Tools --> Macro --> Record New Macro.


A Record Macro dialog box appears, as shown in Figure 1.




Figure 1: The Record Macro dialog box is where you can name your macro and assign a keystroke for running it later.



2. Type a name for your macro in the Macro name text box.


3. Click the Keyboard button.


A Customize Keyboard dialog box appears, as shown in Figure 2; it's where you assign a keystroke combination to your macro.




Figure 2: The Customize Keyboard dialog box.



4. Press the keystroke that you want to represent your macro (such as Alt+F12).


You can repeat this step to assign multiple keystrokes to the same macro if you want.


5. Click the Assign button.


6. Click the Close button.


The mouse pointer turns into an arrow with an audiocassette icon; a Stop Recording toolbar appears, as shown in Figure 3, which you can use to pause or stop recording a macro.




Figure 3: The Stop Recording toolbar.



7. Press the keystrokes that you want to record in your macro.


If you click the Pause Recording button, you can temporarily stop the recording of your macro.


8. Click the Stop Recording button when you finish recording the keystrokes.


To run your macro, press the keystroke combination that you chose in Step 4.



Recording macros in Excel


To record a macro in Excel, follow these steps:



1. Choose Tools --> Macro --> Record New Macro.


A Record Macro dialog box appears.


2. Type a name for your macro in the Macro name text box.


3. Click in the Shortcut Key box (the one that has Ctrl+ to the left) and type a letter.


For example, if you want to replay your macro by pressing Ctrl+W, type W in the Shortcut Key box.


4. Click OK.


A Stop Recording toolbar appears.


5. Press the keystrokes that you want to record in your macro.


6. Click the Stop Recording button when you finish recording the keystrokes.


To run a macro, press the keystroke combination that you chose in Step 3.



Recording macros in PowerPoint


To record a macro in PowerPoint, follow these steps:



1. Choose Tools --> Macro --> Record New Macro.


A Record Macro dialog box appears.


2. Type a name for your macro in the Macro name text box and click OK.


A Stop Recording toolbar appears.


3. Press the keystrokes that you want to record in your macro.


4. Click the Stop Recording button when you finish recording the keystrokes.


To run a macro in PowerPoint, follow these steps:



1. Choose Tools --> Macro --> Macros (or press Alt+F8).


A macro dialog box appears.


2. Click the name of the macro that you want to run.


3. Click Run.










dummies

Source:http://www.dummies.com/how-to/content/taking-shortcuts-with-macros-in-office-2003.html

No comments:

Post a Comment