Sie sind auf Seite 1von 5

11/28/2016

RecordorrunamacroWord

Sign in

Apps

Install
Subscription
Training
Admin

Record or run a macro


Applies To: Word 2007
In Microsoft Office Word 2007, you can automate frequently used tasks by
creating and running macros. A macro is a series of commands and instructions
that you group together as a single command to accomplish a task automatically.
Typical uses for macros are:
To speed up routine editing and formatting
To combine multiple commands for example, to insert a table with a
specific size and borders, and with a specific number of rows and columns
To make an option in a dialog box more accessible
To automate a complex series of tasks
You can record a sequence of actions, or you can write a macro from scratch by
entering Visual Basic for Applications code in the Visual Basic Editor.
NOTE:To work with macros in Office Word 2007, you need to show the Developer tab.

What do you want to do?


Show the Developer tab
Record a macro
Run a macro
Write a macro from scratch

Show the Developer tab


https://support.office.com/enus/article/Recordorrunamacrocd56fb86d8b2475cba399728389feeeb#bm1

1/5

11/28/2016

RecordorrunamacroWord

1. Click the Microsoft Office Button

, and then click Word Options.

2. Click Popular.
3. Under Top options for working with Word, select the Show Developer tab
in the Ribbon check box.
NOTE:The Ribbon is a component of the Microsoft Office Fluent user interface.

Top of Page

Record a macro
1. On the Developer tab, in the Code group, click Record Macro.

2. In the Macro name box, type a name for the macro.


NOTE:If you give a new macro the same name as a builtin macro in Office Word 2007,

the new macro actions will replace the builtin macro. To view a list of builtin macros,
on the Developer tab, in the Code group, click Macros. In the Macros in list, click
Word Commands.

3. In the Store macro in box, click the template or document in which you
want to store the macro.
IMPORTANT:To make your macro available in all documents, be sure to click

Normal.dotm.

4. In the Description box, type a description of the macro.


5. Do one of the following:
Begin recordingTo begin recording the macro without assigning it to
a button on the Quick Access Toolbar or to a shortcut key, click OK.
Create a buttonTo assign the macro to a button on the Quick Access
Toolbar, do the following:
i. Click Button.

https://support.office.com/enus/article/Recordorrunamacrocd56fb86d8b2475cba399728389feeeb#bm1

2/5

11/28/2016

RecordorrunamacroWord

ii. Under Customize Quick Access Toolbar, select the document or all
documents for which you want to add the macro to the Quick Access
Toolbar.
IMPORTANT:To make your macro available in all documents, be sure to click

Normal.dotm.

iii. Under Choose commands from dialog box, click the macro that you are
recording, and then click Add.
iv. To customize the button, click Modify.
v. Under Symbol, click the symbol that you want to use for your button.
vi. In the Display name box, type the macro name that you want to display.
vii. Click OK twice to begin recording the macro.
The symbol that you choose is displayed in the Quick Access Toolbar. The
name that you type is displayed when you point to the symbol.
Assign a keyboard shortcutTo assign the macro to a keyboard
shortcut, do the following:
i. Click Keyboard.
ii. In the Commands box, click the macro that you are recording.
iii. In the Press new shortcut key box, type the key sequence that you want,
and then click Assign.
iv. Click Close to begin recording the macro.
6. Perform the actions that you want to include in the macro.
NOTE: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 select text. For more
information about selecting text by using the keyboard, see Select text.

7. To stop recording your actions, click Stop Recording in the Code group.

Change the keyboard shortcut for a macro


1. Click the Microsoft Office Button

, and then click Word Options.

2. Click Customize.
https://support.office.com/enus/article/Recordorrunamacrocd56fb86d8b2475cba399728389feeeb#bm1

3/5

11/28/2016

RecordorrunamacroWord

3. Next to Keyboard shortcuts, click Customize.


4. In the Categories list, click Macros.
5. In the Macros list, click the macro that you want to change.
6. In the Press new shortcut key box, type the key combination that you want
to choose.
7. Check the Current keys box to make sure that you aren't assigning a key
combination that you already use to perform a different task.
8. In the Save changes in list, click the option that matches where you want to
run your macro.
IMPORTANT:To make your macro available in all documents, be sure to click

Normal.dotm.

9. Click Close.
Top of Page

Run a macro
1. On the Developer tab, in the Code group, click Macros.

2. In the list under Macro name, click the macro that you want to run.
3. Click Run.
Top of Page

Write a macro from scratch


1. On the Developer tab, in the Code group, click Macros.
Was this information helpful?

Yes

https://support.office.com/enus/article/Recordorrunamacrocd56fb86d8b2475cba399728389feeeb#bm1

No

4/5

11/28/2016

RecordorrunamacroWord

2. In the Macro name box, type a name for the macro.


NOTE:If you give a new macro the same name as a builtin macro in Office Word 2007,

the new macro actions will replace the builtin macro. To view a list of builtin macros,
click Word Commands in the Macros in list.

3. In the Macros in list, click the template or document in which you want to
store the macro.
To make your macro available in all documents, be sure to click
Normal.dotm.
4. Click Create to open the Visual Basic Editor.
After you open the Visual Basic Editor, you may want more information about
working with Visual Basic for Applications. For more information, click Microsoft
Visual Basic Help on the Help menu or press F1.
Top of Page

Share

English United States


Contact Us

Privacy & Cookies

Terms of use & sale

Trademarks

Accessibility

Legal

2016 Microsoft

Was this information helpful?

Yes

https://support.office.com/enus/article/Recordorrunamacrocd56fb86d8b2475cba399728389feeeb#bm1

No

5/5

Das könnte Ihnen auch gefallen