answersLogoWhite

0

You can create a macro (macro: An action or a set of actions that you can use to automate tasks. Macros are recorded in the Visual Basic for Applications programming language.) by using the macro recorder to record a sequence of actions, or you can create a macro from scratch by entering Visual Basic for Applications (Visual Basic for Applications (VBA): A macro-language version of Microsoft Visual Basic that is used to program Microsoft Windows-based applications and is included with several Microsoft programs.) code in the Visual Basic Editor (Visual Basic Editor: An environment in which you write new and edit existing Visual Basic for Applications code and procedures. The Visual Basic Editor contains a complete debugging toolset for finding syntax, run-time, and logic problems in your code.).

You can also use both methods. You can record some steps and then enhance them with additional code.

By recording steps

  1. On the Tools menu, point to Macro, and then click Record New Macro.
  2. In the Macro name box, type a name for the macro.
  3. In the Store macro in box, click the template (template: A file or files that contain the structure and tools for shaping such elements as the style and page layout of finished files. For example, Word templates can shape a single document, and FrontPage templates can shape an entire Web site.) or document in which you want to store the macro.
  4. In the Description box, type a description for the macro.
  5. If you don't want to assign the macro to a toolbar (toolbar: A bar with buttons and options that you use to carry out commands. To display a toolbar, press ALT and then SHIFT+F10.), a menu (menu: A list of commands that is displayed when you click a menu name on a menu bar or other toolbar.), or shortcut keys (shortcut key: A function key or key combination, such as F5 or CTRL+A, that you use to carry out a menu command. In contrast, an access key is a key combination, such as ALT+F, that moves the focus to a menu, command, or control.), click OK to begin recording the macro.

To assign the macro to a toolbar or menu, click Toolbars, and then click the Commands tab. In the Commands box, click the macro you are recording, and drag it to the toolbar or menu you want to assign it to. Click Close to begin recording the macro.

To assign the macro to shortcut keys, click Keyboard. In the Commands box, click the macro you are recording. In the Press new shortcut key box, type the key sequence, and then click Assign. Click Close to begin recording the macro.

  1. Perform the actions you want to include in your macro.

When you record a macro, you can use the mouse to click commands and options, but not to select text. You must use the keyboard to record these actions. For example, you can use F8 to select text and press END to move the cursor to the end of the line.

  1. To stop recording your macro, click Stop Recording.

By using Visual Basic for Applications

  1. On the Tools menu, point to Macro, and then click Macros.
  2. In the Macros in list, click the template (template: A file or files that contain the structure and tools for shaping such elements as the style and page layout of finished files. For example, Word templates can shape a single document, and FrontPage templates can shape an entire Web site.) or document in which you want to store the macro.
  3. In the Macro name box, type a name for the macro.
  4. Click Create to open the Visual Basic Editor.

Note If you give a new macro the same name as an existing built-in command in Microsoft Word, the new macro actions will replace the existing actions. To view a list of built-in macros in Word, point to Macro on the Tools menu, and then click Macros. In the Macros in list, click Word Commands.

User Avatar

Wiki User

14y ago

What else can I help you with?

Related Questions

What are some Macro environmental opportunities and threats of companies?

Type your answer here... macro-environmental factorsWaterFoodShelterHeatWorkopportunitiesyou cannot create new water without great expenseyou can farm foodyou can build shelteryou can create heatyou can innovate and create new work opportunitiesthreatscompetition


What are some Macro-environmental opportunities and threats of companies?

Type your answer here... macro-environmental factorsWaterFoodShelterHeatWorkopportunitiesyou cannot create new water without great expenseyou can farm foodyou can build shelteryou can create heatyou can innovate and create new work opportunitiesthreatscompetition


Is word macro is predefined?

Macros are not pre-defined. You can create them yourself at any time.


Can you use a macro lens for everyday photography?

Yes, you can use a macro lens for everyday photography to capture close-up details and create unique perspectives in your photos.


How can I create a DIY macro lens for my camera?

To create a DIY macro lens for your camera, you can use a small magnifying glass or a reversed lens from an old camera. Attach the magnifying glass or reversed lens to your camera using a lens adapter or by holding it in front of the camera lens. Experiment with different distances and angles to achieve the desired macro effect.


I just want my users to be able to hit a macro button instead of a shortcut key so how can I create a macro button in Excel 2003 without having to buy separate software?

Draw a button on your sheet, by going to the View menu and picking Toobars and then the Forms toolbar and drawing your button. It will immediately ask you to connect a macro to it and then you can choose your macro. Then when the button is clicked the macro will run.


Create a macro and assign Ctrl plus l key to run this macro method?

You can record a macro and before starting the recording you can use i key as assigned key to run the macro. Also, if you have an existing macro to which you want to assign i key then Press Alt + F8 which will show you the list of existing macro. Click on Edit and type the i in the assign key box. Remember Ctrl is my default. So, if you want the macro to have Ctrl SHIFT I then turn on the caplock. Your question is not very decriptive in nature.


What is the meaning of macro in Microsoft Word?

A macro is a series of commands that is recorded so it can be played back, or executed, later. There are a couple different ways to create Word macros: The first and easiest way is to use the macro recorder; the second way is to use VBA.


What is the difference between executing a macro and calling a macro?

Calling a macro loads the macro into memory, while executing the macro runs the macro.


What type of damage can the macro virus do?

Macro viruses are capable of damaging your computer in many different ways. Macro viruses can delete files, format drives, corrupt files, create new files, move text, insert pictures, and send files across the internet.


How do you Create Macro on One Workbook and then Let User Choose Location on Another Workbook They Want Macro to Run on?

One way would be to prompt the user to choose a workbook from those currently open (or browse for one that isn't). However, an easier approach is to simply run the macro on the currently active workbook by assigning the macro to a toolbar button.


What is macro call?

Nested macro calls refer to the macro calls within the macros. A macros is available within other macro definitions also. In the scenario when a macro call occurs, which contains another macro call, the macro processor generates the nested macro definition as text and places it on the input stack. The definition of the macro is then scanned and the macro processor complies it.