• Kutools for Excel
  • Kutools for Outlook
  • Kutools for Word
  • Setup Made Simple
  • End User License Agreement
  • Get 4 Software Bundle
  • 60-Day Refund
  • Tips & Tricks for Excel (3000+)
  • Tips & Tricks for Outlook (1200+)
  • Tips & Tricks for Word (300+)
  • Excel Functions (498)
  • Excel Formulas (350)
  • Excel Charts
  • Outlook Tutorials
  • About Us Our Team

Feature Tutorials

  • Search Search more
  • Retrieve License Lost License?
  • Report a Bug Bug Report
  • Forum Post in Forum

How to apply a button to run a macro code in Word document?

Sometimes, you may want to apply a button to run a specific macro code in a Word document, but, how could you solve this task in Word file?

Apply a button to run a specific macro code in Word document

The following steps can help you to deal with this job in Word document, please do as this:

1 . Click where you want to use a button, and then press Ctrl +F9 key to insert a pair of braces, and then type the below text between the braces, see screenshot:

MACROBUTTON MacroName Double-Click To Run Macro

doc button to run code 1

Note : MacroName is the code name in your Word file that you want to run when clicking the button, please change it to your need.

2 . Then, right click the field code, and select Toggle Field Codes from the context menu, see screenshot:

doc button to run code 2

3 . And then, you can format the field text with border and shading for making it as a button. Please select the field text, and then choose Borders and Shading from the Borders drop down list under the Home tab, see screenshot:

doc button to run code 3

4 . In the Borders and Shading dialog box, specify the border style and shading color as you need. See screenshot:

doc button to run code 4

5 . Then, click OK , and the field text has been formatted as a button, now when double clicking this button, your specific macro code will be triggered at once, see screenshot:

doc button to run code 5

Best Office Productivity Tools

Kutools for word - elevate your word experience with over 100 remarkable features.

đŸ€– Kutools AI Assistant : Transform your writing with AI - Generate Content   /    Rewrite Text   /   Summarize Documents   /    Inquire for Information based on Document , all within Word

📘 Document Mastery : Split Pages   /   Merge Documents   /   Export Selection in Various Formats (PDF/TXT/DOC/HTML...)   /   Batch Convert to PDF   /   Export Pages as Images   /   Print Multiple Files at once ...

✏ Contents Editing : Batch Find and Replace across Multiple Files  /   Resize All Pictures   /   Transpose Table Rows and Columns   /   Convert Table to Text ...

đŸ§č Effortless Clean : Sweap away   Extra Spaces   /   Section Breaks   /   All Headers   /   Text Boxes   /   Hyperlinks   /  For more removing tools, head to the  Remove group ...

➕ Creative Inserts : Insert Thousand Separators   /   Check Boxes   /   Radio Buttons   /   QR Code   /   Barcode   /   Diagonal Line Table   /   Equation Caption   /   Image Caption   /   Table Caption   /   Multiple Pictures   /  Discover more in the  Insert group ...

🔍 Precision Selections : Pinpoint Specific Pages   /   Tables   /   Shapes   /   Heading Paragraphs   /  Enhance navigation with more Select features ...

⭐ Star Enhancements : Navigate to Any Location   /   Auto-Insert Repetitive Text   /   Toggle Between Document Windows   /   11 Conversion Tools ...

assign a macro to a button in word

site logo

How to Create and Run a Macro in Word

It's not just easy, it's fun, too

Author avatar

If you work with Microsoft Word a lot and find yourself doing the same things repeatedly, create a macro . Macro is a shortening of the word macroinstruction, which means a series of instructions to accomplish a task.

The great thing about creating macros in Word is that you don’t need to know how to program. If you can press record and stop, you can do this.

How to Create and Run a Macro in Word image 1

Aren’t Macros Dangerous?

Have you heard about macros being bad because they can contain viruses? Although you do have to be careful about opening Office documents from unknown people because they might have malicious macros, that’s not an issue here. You make your own macro, so you know it’s not a virus.

How To Record A Macro in Word

For this example, you’re going to create a macro in Word to insert your signature at the end of a document.

  • With Word open, go to the View tab.
  • Select the down arrow under the Macros button.
  • Select Record Macro
 a new window will open.

How to Create and Run a Macro in Word image 2

  • In the Macro name: field, enter a meaningful name for the macro. Spaces are not allowed. Use an underscore or dash.
  • In the Store macro in: dropdown, you can select what documents you want this macro to be used. If you choose All Documents (Normal.dotm), the macro will be available to you in every new Word document you make from now on. If you choose a single document, it will only apply to that single document. It’s usually best to choose All Documents .

How to Create and Run a Macro in Word image 3

  • In the Description: field, write what the macro does. This is a simple macro with a descriptive name, but as you get confident with macros you’ll do more complex things, so a description is always a good idea.
  • You can choose Assign macro to either a button you’ll create with the Button or hotkeys you can choose using the Keyboard button. There’s already a lot of shortcut keys for Word, so a button may be best. Select Button . A new window will open called Word Options .

How to Create and Run a Macro in Word image 4

  • Here you’ll assign the macro a button on the Word Ribbon. Select Customize Ribbon .
  • In the Choose commands from: dropdown, select Macros . This will show us our macros in the area beneath it.

How to Create and Run a Macro in Word image 5

  • You need somewhere on the ribbon to put the macro. For this example, select Home in the Main Tabs area. Then select New Group .
  • Select Rename so you can give it a meaningful name.
  • In the Rename window, select one of the icons to represent the group then enter My Macros in the Display name field.
  • Select OK to apply it. You’ll see the change in the Main Tabs area.

How to Create and Run a Macro in Word image 6

  • With the new My Macros selected in the Main Tabs area, select the Normal.NewMacros.Insert_Signature macro.
  • Select Add to insert it into the My Macros group.

How to Create and Run a Macro in Word image 7

  • Of course, you’ll want to rename it. With the macro selected in the Main Tabs area, select Rename

  • In the Rename window, select an icon and enter a simple name in the Display name: field.
  • Select OK to commit the change. You’ll see the change in the Main Tabs area.
  • Select OK below the Main Tabs area to finish creating the button for the macro.

How to Create and Run a Macro in Word image 8

  • Go ahead and create whatever signature block you’d like. Add in a scan of your signature or other images. Whatever you’d like. When done that, select the down arrow under the Macros button.
  • Select Stop Recording . That’s it. Your Insert Signature macro is made.

How to Create and Run a Macro in Word image 9

  • Test it out by finding the Insert Signature button you created in the Home tab and select it. Your signature block should magically appear exactly as you designed it.

How to Create and Run a Macro in Word image 10

How To Write a Macro

For most macros, the recording method is the most efficient way to create them. Eventually, you’ll want to do something more complex. This requires writing the macro in the Visual Basic for Applications (VBA) language. We’ve got the best VBA guide for beginners , so bookmark that. Let’s create a macro to give us the average words per sentence to help us tell when we’re being wordy.

  • You need access to the Developer tab which is hidden by default in Word. In the top-left corner of Word, select File .

How to Create and Run a Macro in Word image 11

  • Near the bottom-left, select Options .

How to Create and Run a Macro in Word image 12

  • In the window that opens, select Customize Ribbon .
  • On the right side, look for Developer and put a checkmark next to it.
  • Select OK to close the window. The Developer tab will now show.

How to Create and Run a Macro in Word image 13

  • Select the Developer tab.
  • Select the Macros button.

How to Create and Run a Macro in Word image 14

  • Enter a meaningful name in Macro name: Leave the Macros in: as Normal.dotm so it will apply to all Word documents. Always enter a description in the Description: area.
  • Select Create . The Microsoft Visual Basic for Applications development tool will open.

How to Create and Run a Macro in Word image 15

  • The code that’s shown in the green rectangles below should already be there with some blank space between them. Copy and paste the following code into that space:

Dim s As Range Dim numWords As Integer Dim numSentences As Integer numSentences = 0 numWords = 0

For Each s In ActiveDocument.Sentences numSentences = numSentences + 1 numWords = numWords + s.Words.Count Next

MsgBox “Average words per sentence” + Str(Int(numWords / numSentences)) + “. Less than 15 is best.”

  • Select the Run button to test the code. If it doesn’t run as expected, edit the code until it runs the way you want.

How to Create and Run a Macro in Word image 16

  • Select the Save button and close the development window.

How to Create and Run a Macro in Word image 17

  • Create a button in the Word ribbon using the same method as shown in the “How to Record a Macro” instructions above.
  • Find the button you just created and test it.

How to Create and Run a Macro in Word image 18

My Macro Doesn’t Work When I Save My Word Document

Word defaults to save with the file extension .docx, which doesn’t allow macros to automatically run. If you want the macro to run, you’ll need to change the file type to Word Macro-Enabled Document (*.docm).

This filetype exists partly to combat macro security issues. If you see this file extension on a document you weren’t expecting to receive, be suspicious.

How to Create and Run a Macro in Word image 19

What Else Can I Do With Macros?

You can create macros in Excel , Outlook, even PowerPoint . Anything that you’re currently doing manually, you should be able to record or write a macro to do it. Using macros in Word along with great Windows shortcut keys will amplify your productivity tenfold.

' src=

Guy has been published online and in print newspapers, nominated for writing awards, and cited in scholarly papers due to his ability to speak tech to anyone, but still prefers analog watches. Read Guy's Full Bio

Read More Posts:

assign a macro to a button in word

Leave a Reply

Your email address will not be published. Required fields are marked *

tips.net

  •  >  Word Tips
  •  >  Macros

assign a macro to a button in word

Assigning a Macro to a Button in Your Text

assign a macro to a button in word

Written by Allen Wyatt (last updated September 30, 2021) This tip applies to Word 97, 2000, 2002, and 2003

You already know you can assign a macro to a button (a tool) on your toolbar. Word also allows you to add buttons within the text of you document. These buttons have a macro or a Word command assigned to them, and you can control what happens when the button is selected in text. This is all instituted through the use of a field code. It may be a bit of a misnomer to refer to the result of this field code as a "button," because no graphics are involved whatsoever, although you can create your own graphic and embed it into the field. The syntax for the field code is:

MacroName is the name of the macro or command you want to run, and Display is the text you want displayed by the field code. If you use a graphic instead of text, then the graphic is displayed. When a user double-clicks on the displayed text or graphic, then the macro or command defined by MacroName is executed.

To assign a command or macro to a button, and insert that button in your text, follow these steps:

  • Position the insertion point where you want the button to appear.
  • Press Ctrl+F9 to insert a field.
  • Between the field brackets, type MacroButton , then the name of the command or macro you want the button to execute.
  • Type the text you want displayed, or insert a graphic to be used as a button.
  • Press F9 to update the field display.

Note: If you would like to know how to use the macros described on this page (or on any other page on the WordTips sites), I've prepared a special page that includes helpful information. Click here to open that special page in a new browser tab .

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (1571) applies to Microsoft Word 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Word (Word 2007 and later) here: Assigning a Macro to a Button in Your Text .

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates , a computer and publishing services company. Learn more about Allen ...

MORE FROM ALLEN

Page Ranges in a TOC

It is easy to generate a table of contents for a document, and that TOC can contain page number references for each ...

Replacing Text and Capitalizing a Letter in One Step

The Find and Replace capabilities of Word are very powerful. You can even use them to do some complex and specific ...

Understanding Single Line Spacing

Single line spacing, the default spacing used in a paragraph, allows Word to adjust the spacing of individual lines in a ...

assign a macro to a button in word

Do More in Less Time! Are you ready to harness the full power of Word 2013 to create professional documents? In this comprehensive guide you'll learn the skills and techniques for efficiently building the documents you need for your professional and your personal life. Check out Word 2013 In Depth today!

More WordTips (menu)

Setting a VBA Variable From a Bookmark

Bookmarks are quite helpful in a document. You may want to transfer the contents of a bookmark into a macro variable in ...

Determining the Length of a String

Need to find out in a macro how long a particular text string is? You can figure it out by using the Len function, ...

Offering Options in a Macro

When creating macros, you often need to offer a series of choices to a user. This tip demonstrates how easy it is to ...

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

(Your e-mail address is not shared with anyone, ever.)

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

(gif, jpeg or png only, 5MB maximum file size)

Notify me about new comments ONLY FOR THIS TIP

Notify me about new comments ANYWHERE ON THIS SITE

Hide my email address

What is two more than 9?

2020-11-21 11:52:50

Doug Minaker

Small correction here. Control + F9 does not work. You should use Control +Fn + F9.

2019-04-11 14:46:33

Is it possible to execute a MacroButton like this with a single mouse click like a hyperlink...? Maybe via some background VBA...?

2018-11-05 14:41:09

Same. Cannot get a graphic to work in this context (instead of text).

2017-10-23 01:32:45

Your tips appear to be quite popular... https://davescomputertips.com/how-to-assign-a-macro-to-a-button-in-a-word-document/

2017-03-02 06:50:03

Hi Allen Thanks for the tip but when I use the field code with a button inserted it gives me a duplicate button which is inactive the one button work well but how do I remove the other inactive button?

2015-12-16 09:38:49

I cannot get a picture to work with process. I get works to work. I have tried a jpg and insert clipart. When ever I double click the picture the menu ribbon goes to tab format. And that is all that happens. I put text in the brackets as a 3rd parameter that works. Any pointers? Thx Russ

2015-07-20 05:44:45

Hi Allen, Very good tip indeed. But I'm afraid I didn't catch the trick to use a graphic. Could you be more explicit, please? Thank you. J-M

Got a version of Word that uses the menu interface (Word 97, Word 2000, Word 2002, or Word 2003)? This site is for you! If you use a later version of Word, visit our WordTips site focusing on the ribbon interface .

Visit the WordTips channel on YouTube

assign a macro to a button in word

View the most recent newsletter.

Links and Sharing

  • WordTips FAQ
  • Questions or Comments
  • Great Branding Ideas
  • Free Calendars

OUR COMPANY

  • Sharon Parq Associates, Inc.
  • About Tips.Net
  • Advertise with Us
  • Our Privacy Policy
  • Author Index

OUR PRODUCTS

  • Helpful E-books
  • Newsletter Archives
  • Video Courses
  • Excel Products
  • Windows Products
  • Word Products
  • Beauty and Style
  • ExcelTips (Excel 97–2003)
  • ExcelTips (Excel 2007–2021; 365)
  • Home Improvement
  • Money and Finances
  • Pests and Bugs
  • Pets and Animals
  • WindowsTips (Microsoft Windows)
  • WordTips (Word 97–2003)
  • WordTips (Word 2007–2021; 365)

Copyright © 2024 Sharon Parq Associates, Inc.

Daves Computer Tips

How to Assign a Macro to a Button in a Word Document

word logo-new

These buttons have a macro or Word command assigned to them and you can control what happens when the button is clicked in your text. And this is all because you are using a field code!

We really should not refer to the macro as a “button,” because there is no graphic or icon involved. You can, however, create your own graphic and embed it into your field. That field code syntax would be:

MacroButton MacroName Display

MacroName is the name of the macro or command you would like to urn and Display is the text you would like displayed by the field code. If you use a graphic rather than text, then the graphic is displayed. When you double-click on the displayed text or graphic, then the macro or command defined by MacroName will be executed.

Follow the steps below to learn how to assign a command or macro to a button in your text:

  • Position your cursor where you would like the MacroButton to appear.
  • Click CTRL + F9 to insert a field.
  • Between the field brackets, key in the field name MacroButton and a space).

word macro button

  • Key in the name of the command or macro you want the button to executed.
  • To find the correct macro or command names, you can right-click on a blank area of your Ribbon and click on Customize Quick Access Toolbar . You can the names in the dialog box.
  • Key in the button name text you want displayed or inspect a graphic to be used.
  • Click F9 to update the field display.

updated word field

About The Author

' src=

Carol Bratt

1 thought on “how to assign a macro to a button in a word document”.

' src=

Carol I love your tips 🙂 You make me look like a genius at work every time I use one of your tips. I need to just have a folder for all these. Keep these coming!

Comments are closed.

WHY NOT SUBSCRIBE TO OUR NEWSLETTER?

Get great content like this delivered to your inbox.

It's free, convenient, and delivered right to your inbox! We do not spam and we will not share your address. Period!

assign a macro to a button in word

  • All-Access Subscriptions
  • Business Licensing
  • Lightroom Classic
  • Photoshop Elements
  • Crystal Reports
  • Interview Skills
  • Resume Skills
  • Excel for Lawyers
  • Outlook for Lawyers
  • QuickBooks for Lawyers
  • Word for Lawyers
  • Microsoft Office Suite
  • Outlook on the Web
  • Microsoft Project
  • Microsoft Teams
  • QuickBooks Online
  • QuickBooks Pro
  • Video Course Options
  • SUBSCRIPTIONS
  • Photoshop Elements 2024
  • Photoshop Elements 2023
  • Photoshop Elements 2022
  • Photoshop Elements 2021
  • Photoshop Elements 2020
  • Photoshop Elements 2019
  • Photoshop Elements 2018
  • Photoshop Elements 15
  • Google Classroom for Teachers
  • Google Docs
  • Google Drive
  • Google Forms
  • Google Sheets
  • Google Slides
  • Mac OS Keyboard Shortcuts
  • Excel Formulas and Functions
  • Excel Keyboard Shortcuts
  • Excel Tables PivotTables and Charts
  • Access for Microsoft 365
  • Excel for Microsoft 365
  • Microsoft Office 365
  • Outlook for Microsoft 365
  • PowerPoint for Microsoft 365
  • Publisher for Microsoft 365
  • Word for Microsoft 365
  • Access 2021
  • Microsoft Office 2021
  • Outlook 2021
  • PowerPoint 2021
  • Publisher 2021
  • Access 2019
  • Microsoft Office 2019
  • Outlook 2019
  • PowerPoint 2019
  • Publisher 2019
  • Access 2016
  • Microsoft Office 2016
  • OneNote 2016
  • Outlook 2016
  • PowerPoint 2016
  • Publisher 2016
  • Microsoft Office 2013
  • OneNote 2013
  • Outlook 2013
  • PowerPoint 2013
  • Microsoft Office for iPad
  • QuickBooks Pro 2024
  • QuickBooks Pro 2023
  • QuickBooks Pro 2022
  • QuickBooks Pro 2021
  • QuickBooks Pro 2020
  • QuickBooks Pro 2019
  • QuickBooks Pro 2018
  • QuickBooks Pro 2017
  • QuickBooks Pro 2016
  • QuickBooks Pro 2015
  • QuickBooks Pro 2014
  • Sage 50 Accounting
  • Windows 11 and 10 Keyboard Shortcuts
  • Chrome OS for Chromebooks
  • Word and Excel (Mac) 2022
  • Word and Excel (PC/Windows) 2021-2016 and 365
  • QuickBooks Desktop (PC/Windows) 2024
  • QuickBooks Desktop (PC/Windows) 2023
  • QuickBooks Desktop (PC/Windows) 2022-2015
  • Windows 11 and 10
  • Our History
  • Customer Service
  • Testimonials
  • Lost Password
  • Register a Product
  • Manage My Account
  • Member Login

Try the Word Course for Free!

Assign a macro to a button in word 2013, assign a macro to a button in word 2013: video.

This video lesson, titled “ Assigning Macros to a Button in Word 2013 ,” shows you how to assign macros to a button in Word 2013.

Assign a Macro to a Button in Word 2013: Overview

You can assign a macro to a button in Word 2013. Word 2013 lets you assign a macro to a button that appears in the Ribbon, the Quick Access toolbar, or to an unused keyboard shortcut of your choosing. This can make running macros much easier than the process involved with running them through the “Macros” dialog box. Once you have assigned a macro to a button or a keyboard shortcut, you can simply click the button or press the keyboard shortcut in order to run the associated macro.

You assign macros to buttons or keyboard shortcuts in the “Word Options” dialog box. You can access this dialog box by clicking the “File” tab in the Ribbon and then clicking the “Options” button in the lower left corner of the command panel. This will open the “Word Options” dialog box.

Next you must decide if you want to assign the macro to a button on a tab within the Ribbon, to a button in the Quick Access toolbar, or to a keyboard shortcut.

If you want to assign the macro to a button on a tab within the Ribbon, then first click the “Customize Ribbon” category at the left side of the “Word Options” dialog box. Next, use the “Choose commands from:” drop-down to select the “Macros” category. You should see the macros that you created appear within this column. You can then select the “Main Tabs” command from the “Customize the Ribbon:” drop-down. You will then see the tabs and groups appear in the column as a collapsed outline. You can click the plus signs to expand a tab and see the groups within it.

When you add macro buttons to a tab, they must appear within their own custom groups that you create on the tab. To do this, start by selecting the name of the tab within which you want to create your custom macro button group. Then click the “New Group” button at the bottom of the column to add a new group to the selected tab. Also note that you can create your own custom tab itself by clicking the “New Tab” button, instead, if you prefer to add your macros to a custom tab versus a custom group. Once you have created a custom group, make sure it is selected in this column. Then select the name of the macro to add to this custom group by selecting it from the “Choose commands from column:.” You can then click the “Add >>” button that appears between the columns to add the selected macro to the selected custom group in the Ribbon. Note that you can then select the custom group, custom tab, or macro button that you have created and click the “Rename
” button at the bottom of the column in order to rename the custom group or custom tab using the “Rename” dialog box. In the “Rename” dialog box, you can select a button symbol from the “Symbol:” section, if desired, and then type a name for the button, group, or tab into the “Display name:” text box. Then click the “OK” button to apply your changes.

Also note the “Reset” button at the bottom of this column next to the “Customizations:” label. You can click this button to select either “Reset only selected Ribbon tab,” or “Reset all customizations” from the drop-down menu that appears. This will reset the currently selected Ribbon tab, or reset all customizations based on which command you choose. You can use this to reset unwanted customizations to the Ribbon, if they occur.

If you want to assign a macro to the Quick Access toolbar instead of to the Ribbon, start by selecting the “Quick Access Toolbar” category from the left side of the “Word Options” dialog box. Then select “Macros” from the “Choose commands from:” drop-down. The name of your macro should appear in the list below the drop-down menu. Select the name of the macro that you want to add to the Quick Access toolbar from this list. Then click the “Add >>” button in the middle of the options window to move the command from the left list to the list at the right side of the window. The list at the right side of the window is a listing of the buttons that will be available on the Quick Access toolbar. Note that you can click on the name of the macro shown in the list at the right side, and then click the small upwards and downwards pointing arrows that are next to it in order to move the command up or down through the listing of button commands. Also, if you want to give the button a different picture, you can select the name of the macro in the list at right and then click the “Modify
” button at the bottom of the list. In the “Modify Button” dialog box that appears, you can click on the button picture that you want to use for the macro from the “Symbol:” list, enter a name for the button into the “Display name:” text box, and then click the “OK” button.

If you want to assign a macro to a keyboard shortcut instead of a button, start by clicking the “Customize Ribbon” category at the left side of the “Word Options” dialog box. Then click the “Customize
” button in the lower left corner of the options side of the dialog box. That will open the “Customize Keyboard” dialog box. Select “Macros” from the “Categories” list at the left side of this dialog box. That will then display all of the available macros in the “Macros:” list at the right side of the dialog box. Select the macro that you would like to assign to a keyboard shortcut from the “Macros:” list. Next, click into the “Press new shortcut key” text box and press a new keyboard shortcut combination, such as “Alt”+“Shift”+“B”, for example. If the selected keyboard shortcut is assigned it will display the function to which the keyboard shortcut has been assigned below the “Current keys:” list. If it is unassigned, it will display that fact in the same location. Make sure that the keyboard shortcut that you use is unassigned. If you assign a macro to a standard, or assigned, keyboard shortcut you will overwrite the standard shortcut! Once you can see that your keyboard shortcut is unassigned, click the “Assign” button and then click the “Close” button.

Once you have finished assigning your macros using the “Word Options” dialog box, click the “OK” button in the lower right corner of the dialog box to finish your customization and close the dialog box.

' src=

About Keeley Byrnes

Save $100! One Year Online Entire Library $99. Click here for more info.

Sign up for our daily newsletter

  • Privacy Policy
  • Advertise with Us

How to Create and Use Macros in Microsoft Word

Simon Batt

When using Microsoft Word, you may feel the need to repeat a specific action multiple times. This may involve reusing preset text or inserting specific text with intricate formatting. It can be a chore, and you may be wishing for an easier way to do it. Thankfully, there is one! By making use of Word’s macros, you can automate repetitive actions and make your life simpler.

What Are Macros?

So, what are macros? The best way to think of macros is as a series of instructions. You set out a series of steps that you want Word to automate, then tell Word to perform those steps whenever you like. This makes automation very easy, and can save a lot of time and effort. The easiest way to create a macro is to allow Word to record your actions, then physically perform your desired actions within the document. Once recorded, you can tell Word to repeat what you did at any time.

Making a Macro

So now that we know what they do, let’s learn to make a macro in Microsoft Word! In this example we’ll be creating a macro that automatically creates a table. This might be a useful feature if you occasionally see yourself needing to create a new table without manually making a new one or copy-pasting an existing table.

First, we need to tell Microsoft Word how to make our table. To do this, we click on “View,” then “Macros,” then “Record Macro.”

word-macro-create

We name our macro here. For this example we’ll call it “CreateTable.”

word-macro-name

Underneath the naming box are two buttons, “Button” and “Keyboard.” This is where you pick if you want to activate your macro via a button within Word or by pressing a hotkey on your keyboard.

Selecting the Button Option

If you select “Button,” you’ll be taken to a new popup window. It may look confusing at first, but it’s just Word allowing you to add the button to the Quick Access bar. This is where we want our button, so we’ll select the macro and click “Add >>” to add it to the list on the right.

word-macro-button-add

With the macro still selected, click “Modify…” at the bottom of the list.

word-macro-button-modify

Here you can choose what icon your button uses. Pick something that suits your macro, then OK out of all windows.

word-macro-button-icon

Selecting the Keyboard Option

If you select the keyboard option, you can define which hotkey to assign the macro to. It’s compatible with quite a few combinations, such as Ctrl + [Key] and Ctrl + Shift + [Key] , so pick out a hotkey that suits you. Word will let you know if anything is currently assigned to that hotkey so you don’t interfere with existing shortcuts. Once you’ve found the perfect key combination, click “Assign.”

word-macro-keyboard-assign

Recording the Macro

Now that you have set up the method of activation, Microsoft Word will begin recording your actions. While it’s recording, any actions you now perform in the document will be remembered in the macro. In this example, we create our table and fill it out with the essential fields. Because our actions are being recorded, we should be careful and not make any mistakes!

word-macro-table-example

Once the table is done, we click “View,” then “Macro” again, and then click “Stop recording.”

word-macro-stop

Now that our macro is recorded, we can make this table at any time we like. If we assigned it to a hotkey on the keyboard, we can press those keys to insert a table. Likewise, if we made a button for it, we can find that button in the Quick Access bar.

word-macro-button-bar

Regardless of which method we selected for the macro, our table is replicated when we activate it. Now we can recreate our base table with little hassle!

word-macro-table-duplicate

Deleting a Macro

When your macro has outlived its use, you can get rid of them by simply clicking “View,” then “Macros,” then “View Macros.”

word-macro-view

Select the macro you don’t want anymore, then click “Delete.”

word-macro-delete

Macro Safety

While macros can be used to make life easier, they can also have nefarious intents! Never run macros that have come from an untrusted source or download a Word document attached to a suspicious email. “Macro viruses” can be a real problem, so make sure you stay safe when using them.

Macros Made Easy

When you need to perform repetitive actions in Word, a macro can come in great use. Now you know how to make a keyboard or button macro, how to record it, and how to use it once it’s made.

Do you see yourself using macros a lot? Do you already? Let us know below.

Our latest tutorials delivered straight to your inbox

Simon Batt

Simon Batt is a Computer Science graduate with a passion for cybersecurity.

Word Count Google Docs Featured

tips.net

  •  >  Word Tips
  •  >  Macros

Assigning a Macro to a Shortcut Key

assign a macro to a button in word

Written by Allen Wyatt (last updated August 3, 2023) This tip applies to Word 2007, 2010, 2013, 2016, 2019, and Word in Microsoft 365

Word allows you to assign macros or commands to specific key combinations. These key combinations are referred to as shortcut keys , and when used they result in the macro or command being executed. When you first create a macro by recording it, Word gives you the opportunity to assign the macro to a specific key combination. If you later want to change the key combination, you can follow these steps:

  • Display the Word Options dialog box. (In Word 2007 click the Office button and then click Word Options. In Word 2010 or a later version, display the File tab of the ribbon and then click Options.)
  • At the left side of the dialog box, click Customize (Word 2007) or Customize Ribbon (Word 2010 or later).
  • Near the bottom of the dialog box, click the Customize button. Word displays the Customize Keyboard dialog box. (See Figure 1.)

assign a macro to a button in word

Figure 1. The Customize Keyboard dialog box.

  • Scroll through the Categories list and select the Macros category. The list at the right side of the dialog box changes to show the currently available macros.
  • In the Macros list, select the macro you want assigned to the shortcut key.
  • With the insertion point in the Press New Shortcut Key box, press the shortcut key you want to use. For instance, if you want to use Ctrl+Alt+J , press that.
  • Just below the Current Keys box you can see whether the shortcut key is already assigned to a different function.
  • Click on Assign.
  • Repeat steps 5 through 8 for each change you want to make.
  • Click on Close.

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (8058) applies to Microsoft Word 2007, 2010, 2013, 2016, 2019, and Word in Microsoft 365.

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates , a computer and publishing services company. Learn more about Allen ...

MORE FROM ALLEN

Converting Time Notation to Decimal Notation

Want to convert an elapsed time, such as 8:37, to a decimal time, such as 8.62? If you know how Excel stores times ...

Applying Borders to Tables

Want to change the borders that Word adds to your tables? You have complete control over the way your borders appear, ...

Setting the Width for Row Labels

Excel displays, by default, a row label or heading at the left side of each row on the screen. As you scroll down the ...

assign a macro to a button in word

The First and Last Word on Word! Bestselling For Dummies author Dan Gookin puts his usual fun and friendly candor back to work to show you how to navigate Word 2013. Spend more time working and less time trying to figure it all out! Check out Word 2013 For Dummies today!

More WordTips (ribbon)

Determining the Horizontal Position of the Insertion Point

Need to figure out how far the insertion point is from the left margin? You can do so by using this small macro that ...

Moving the Insertion Point in a Macro

One of the common things done in macros is to somehow "process" documents, which often means moving the insertion point ...

Running Macros from Macros

Need to run one macro from within another macro? You can easily do it by using the Run method of the Application object, ...

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

(Your e-mail address is not shared with anyone, ever.)

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

(gif, jpeg or png only, 5MB maximum file size)

Notify me about new comments ONLY FOR THIS TIP

Notify me about new comments ANYWHERE ON THIS SITE

Hide my email address

What is two more than 9?

2024-02-17 08:47:46

I appreciate your articles!

2023-11-05 22:19:13

Thanks! Great info (as always!) Lenny

2020-11-24 23:30:01

Re Items 1. to 3.: In Word365 for Mac delete all and replace with: Go to Tools/Customize Keyboard

2020-02-16 20:33:02

In the categories list, why do you think the Micro$oft programmers included hundreds of categories in random order, rather than say alphabetical order which might make them easier to find?

Got a version of Word that uses the ribbon interface (Word 2007 or later)? This site is for you! If you use an earlier version of Word, visit our WordTips site focusing on the menu interface .

Visit the WordTips channel on YouTube

assign a macro to a button in word

View the most recent newsletter.

Links and Sharing

  • WordTips FAQ
  • Questions or Comments
  • Great Branding Ideas
  • Free Calendars

OUR COMPANY

  • Sharon Parq Associates, Inc.
  • About Tips.Net
  • Advertise with Us
  • Our Privacy Policy
  • Author Index

OUR PRODUCTS

  • Helpful E-books
  • Newsletter Archives
  • Video Courses
  • Excel Products
  • Windows Products
  • Word Products
  • Beauty and Style
  • ExcelTips (Excel 97–2003)
  • ExcelTips (Excel 2007–2021; 365)
  • Home Improvement
  • Money and Finances
  • Pests and Bugs
  • Pets and Animals
  • WindowsTips (Microsoft Windows)
  • WordTips (Word 97–2003)
  • WordTips (Word 2007–2021; 365)

Copyright © 2024 Sharon Parq Associates, Inc.

Stack Exchange Network

Stack Exchange network consists of 183 Q&A communities including Stack Overflow , the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

How to assign VBA to a keyboard shortcut in Microsoft Word?

Okay this sounds silly. I am trying to assign a Macro to a keyboard shortcut in Microsoft Word.

Let's say I want to assign macro LangUS to a keyboard shortcut

enter image description here

I want to assign the macro to shortcut CTRL + SHIFT + L. While Microsoft Excel prompts me to assign a keyboard shortcut before recording, this is not the case in Microsoft Word.

In addition, online resources encourage me to use Option button in Macro. However, there is no Option button. The available button is Organizer which displays another thing

enter image description here

I'm not familiar with VBA coding as well so I can't directly write the codes in the VBA editor

Any ideas on how to assign a shortcut to a Macro in Word? TIA.

  • microsoft-word
  • keyboard-shortcuts

amedicalenthusiast's user avatar

2 Answers 2

You can assign a macro to a keyboard shortcut in word rather simply..

Here is my article on the MS website about assigning keyboard shortcuts .

Here are just the steps required to add the keyboard shortcut to a macro in Word for Windows 2010 or later:

File > Options Customize the Ribbon Customize Keyboard (Button) Choose the storage location for your customization (Either the normal template or the current document/template) Choose what category it is you want to use the shortcut on (i.e. macros, styles) Pick the specific macro, command, style, building block to which you will assign the shortcut Click in the box for the new shortcut and press your shortcut combination. Look to see if already assigned. Click on the Assign button. Repeat steps 1-8 as needed. Then Close the Customize Keyboard dialog and OK your way out of the Customize the Ribbon dialog. If prompted, save changes to the template.

Note, the article also contains steps for other versions of Word as well as other kinds of things to which a keyboard shortcut can be assigned.

Charles Kenyon's user avatar

Use a third-party popular and free utility, autohotkey. Make sure to use the extensive help they have available.

  • Thanks for the insights! Does Word not provide feature to assign Macros to keyboard shortcuts unlike Excel? –  amedicalenthusiast Aug 11, 2022 at 6:26
  • IMO, it is easier in Word than in Excel. See my answer. –  Charles Kenyon Aug 11, 2022 at 19:56

You must log in to answer this question.

Not the answer you're looking for browse other questions tagged microsoft-word keyboard-shortcuts vba macros ..

  • The Overflow Blog
  • OverflowAI and the holy grail of search
  • Featured on Meta
  • Our Partnership with OpenAI
  • What deliverables would you like to see out of a working group?

Hot Network Questions

  • Movie where the only survivor from a space colony or expedition is found and recovered by a ship. He turns out to be infected and turns evil
  • Why are search problems assumed to have the structure of "find a path in a graph"?
  • Is there a single word (or a short phrase) meaning "to be used both in the UK and in the US"
  • Exclude certain filename suffixes when searching using glob qualifiers
  • Unable to change file ownership through find-exec
  • Analytic/continental philosophy and scientific realism
  • cp -P * vs. cp *(.) vs. cp *(-.)
  • Examples where a derived noun and a passive form in '-or' are unrelated
  • How to insert a pex segment with sharkbite/ push-to-fit connectors in an existing [copper] line
  • The older, the smarter. Is the wisdom of time a scientifically proven fact or just human prejudices?
  • Compute the degree of a string
  • Can you switch your "Replicate Magic Item" Infusion after a long rest?
  • Why the color is different in two pictures in similar conditions and setting?
  • prisoner's dilemma bimatrix
  • Why does classical physics not predict particles in the double-slit experiment to land in just two different locations?
  • If we consider the spacetime of the universe to be four-dimensional, does the Big Bang lie in its center?
  • How to maintain good boundaries when manipulative co-worker and boss have years-long relationship at previous jobs?
  • How to express the notion of "from "a" to the nearest "z"" with patterns?
  • Director forcing an all day meeting on an off day before a holiday
  • `exit` man page
  • ConTeXt equivalent for \textcommabelow (e.g. a t-comma)
  • Spacing and vertical lines on a tabularx
  • Is “That store sells watches for one dollar each” grammatically correct? Are there better alternatives to this sentence, such as with “at”?
  • Cubic splines in Cox model

assign a macro to a button in word

assign a macro to a button in word

What are Microsoft Word macros?

Although Microsoft 365 apps have been available for years, users are still unfamiliar with some of their useful functions. Macros are one feature that stays under the radar but is handy for performing repetitive tasks and processes. If you are unfamiliar with Word macros, we cover everything about Word macros and offer step-by-step instructions for recording and using them in your documents.

Microsoft has Word apps for the desktop, web, iPhone, and Android . You can record and use macros only on the Windows and Mac apps. We use Microsoft Word for Windows in the screenshots below.

How to use Microsoft 365 (Office) on a Chromebook

Microsoft word macros defined.

A macro is a series of actions and commands you store and run when you execute a complex task. If you want to use a series of actions in your Word document repeatedly, record a macro for the sequence and save it for the existing or all documents.

Macros are handy when performing several tasks, such as formatting text, adding pre-formatted tables, inserting content, and more within a document. A macro is a one-click magic that has the program complete tasks for you.

How do macros work in Word?

Word macros use Visual Basic for Applications (VBA) language to record a script. You don't need to learn a programming language to create macros. The built-in macro recorder tool does the heavy lifting in the background and does the job without making you write a single code.

All you do is start the macro recorder, perform a series of actions with your mouse and keyboard, and stop recording to save the sequence. The system generates the VBA code for the macro automatically.

You can assign a key combination or button to your newly recorded macro and run it anytime. You can pin a macro to the Word toolbar and run it with a single click.

Why should you use macros in Microsoft Word?

Before we check Word macros in action, let's review the top reasons for integrating them into your workflow.

Uniform document formatting

Macros standardize formatting across your documents. Whether you create a business proposal, client letter, or invoice, apply a predefined set of headers, footers, or a company logo and use macros to ensure a standard and professional look across documents.

Automate repetitive tasks

Do you often use a specific formatting style or insert the same media files in your documents? Record a macro in Word and automate the process with a single click.

Run complex calculations

Macros can run calculations, analyze data, and create reports based on your document content.

Where can I access macros in Word?

There are several ways to access macros in Microsoft Word. You can check it from the View menu or the Developer settings. Slide to the View menu and find the Macros option.

If you don't see Macros under the View menu, follow the steps below.

  • Launch a Word document and select File in the upper-left corner.
  • Select Options .
  • Select Customize Ribbon and go to Main Tabs under the Customize the Ribbon menu.
  • Scroll down and select Developer . Click OK to close the menu.
  • Find and select the Developer tab in Word and check your macros list, options like record/pause macro, and macro security.

Record macros in Microsoft Word

Now that you know how Word macros work, let's record one using the steps below.

  • Access the Macros option in your Word documents (refer to steps in the section above).
  • Select Record Macro .
  • Give it a relevant name. Add a description to reflect the purpose of the macro.
  • Store the macro in all documents or limit it to the current document.
  • Assign a button or a keyboard shortcut to a macro. When you choose the former, it opens the Customize the Quick Access Toolbar menu.
  • Select Add to slide it over the right window. Assign a new icon to the macro if you want.
  • Click OK and start recording. The key for the new macro appears at the top toolbar for easy access.
  • If you assign a keyboard shortcut, assign a keyboard sequence from the following menu. Select Press new shortcut key and press your preferred key combination. Word notifies you if an added key combination is being used.
  • Click Assign and start recording a macro.
  • Perform actions such as typing, formatting text, inserting media, adding tables, and other actions you want to record and automate.
  • Click Macros at the top and select Stop Recording .
  • From now on, you can open Macros in Word, glance over your existing macros, and run them at your convenience. You can also delete and edit your macros from the same menu.

Complete your Microsoft Word setup

If you are tired of going through the same routine in Word documents, create a macro to simplify your workflow. Apart from macros, explore the best Microsoft Word templates to get a jump-start on drafting a document. What are you waiting for? Create several Word macros and use them to save time and boost productivity. Also, consider the security risks if you plan to import macros from untrusted sources.

What are Microsoft Word macros?

How-To Geek

Keyboard macros aren't just for programmers (here's how i use them every day).

These macros require no programming experience to save you time.

Macros are essential to any efficient office setup. You don’t have to have a programming degree in order to create useful macros that can save you time throughout your workweek. Not sure where to get started with macros? Well, let me tell you about a few of my favorite shortcuts.

Copy and Paste Macros Get Daily Usage

We’ll start off with my most used macro of all: copy and paste. You might say, “Patrick, copy and paste are simple keyboard shortcuts that everyone knows, why program it to a macro?” To which I would reply, “A single keypress is more efficient than hitting two keys awkwardly with your hand.”

Copy and paste are two keyboard shortcuts probably every person knows, but it’s honestly a little cumbersome to hit with your left hand. While possible, it’s not always the easiest thing. And, if you switch between macOS and Windows often (like me), then you’re stuck with trying to program your body to do Ctrl+C on Windows, and Command+C on macOS. Well, with a macro, you don’t have to remember any of that.

I use a pretty premium keyboard that has several keys where others only have one, but it’ll work just the same on any keyboard capable of using macros. I simply have one of the buttons below the left spacebar on my Dygma Raise programmed to copy, and then one on the right set to paste. I simply have to click a single button and my computer copies what's highlighted or pastes whatever is on the clipboard. This ties well into the next macro too, as it will paste more than just text. Whatever is in your clipboard will be inserted into the receiving program, just like if you were hitting Ctrl+V or Command+V.

Screenshots With a Single Keystroke

Screenshots used to not be the easiest thing to do on Windows, as you only had the Print Screen function and then would have to dive into Paint or another program to crop it. Well, with Windows 10 and 11 , you have the keyboard shortcut Windows+Shift+S to capture a portion of your screen and copy it to the clipboard. That’s a pretty complicated shortcut to memorize, and requires contorting your fingers in weird ways to hit it properly. While possible, it’s easier to just remember a single keyboard shortcut, and that’s where this macro comes into play.

To the right of my copy macro key on my keyboard, I have a macro that takes a screenshot. It simply mimics me hitting Windows+Shift+S and drops me into the screenshot tool. From there, I use my mouse (which sits between my two keyboard halves like all mice should) and drag it across the portion of my screen that I want to capture. Now, that’s in my clipboard and ready for me to use the paste macro to insert into a program!

macOS users can benefit from the same thing, though on macOS it’s a different shortcut you’ll be programming into the macro. You’ll want to use the Shift+Command+4 shortcut inside the macro to capture a portion of the screen and copy it to your clipboard. However, with macOS, once you’re into the screenshot tool, you can click the spacebar to switch between capturing the entire window you’re hovering over or just a portion of the screen.

Exporting from Photoshop Made Easy

While I don’t use this macro much anymore (as my Photoshop usage over the past year has gone way down), there was a time that this saved me a lot of time. In Photoshop , if you want to “Save for web”, the keyboard shortcut is Alt+Shift+Ctrl+S. That’s a lot to remember, and it used to have me contorting my hand in a very weird way in order to hit it. Then, once you’re at that popup, you have to hit enter in order to actually save. I know there are other methods to save in Photoshop, but because of what I used to do, this was the best way to export for me.

So, what did I do? I created a macro, of course! With two key presses this time (one to switch layers on my keyboard, and one to trigger the macro), I could save a picture from Photoshop simply, without contorting my fingers.

This macro was a bit more complicated, and functions in two stages. First, it does the key press combination to trigger the save function, then it pauses for 100ms, and then it clicks enter. What this does is open the save dialog first, then wait for the dialog to fully open and be ready to interact with, and then click enter so I’m ready to go ahead and save the file.

You could, if you wanted, then program another 100ms pause and click enter again to go ahead and trigger the save function into the folder that it pops up. This would further streamline the process, but also remove the ability for you to rename or choose the destination folder during the save process, which is why I skipped it.

This alone saved me a lot of time every week when I was processing dozens of pictures every day, and sometimes hundreds per week.

Copy a Link and Shorten It in One Move (on macOS)

If you’re constantly shortening (or even affiliating) links on macOS, then this piece of software and macro are exactly what you should be leveraging. Using a piece of software called Short Menu , you can program a keyboard shortcut that will shorten any URL you have in your clipboard.

I used this often when I did deals writing, and had the keyboard shortcut programmed as a macro right next to my copy function. So, when I needed to affiliate or shorten a URL, I would start by using my copy macro, then click the button next to that to shorten or affiliate the URL, then click the next button to paste. I took something that would normally take about 6–10 keystrokes and shortened it to 3. That doesn’t sound like a massive change, but it makes an astronomical difference in your daily workflow for sure.

What Can You Macro?

As you see above, there are quite a few things that I've turned into a macro that you might not have thought of before. So, what can you macro?

There are so many mundane, repetitive things that we do on our computers every day that can be made simpler and faster by turning them into a macro. For me, I have a keyboard that supports multiple layers and allows me to create macros within its own software. For you, you might need third-party programs like AutoHotKey on Windows or HammerSpoon for macOS. Or, you could opt instead for something like Elgato’s Stream Deck, which is a dedicated macro keypad that has mini LCD’s which can be set to show different images to help you remember what each button does.

We reviewed the Stream Deck+ , if you need inspiration as to how to expand your desk setup further.

  • Work with macros Video
  • Edit a macro Video
  • Save your macro Video
  • Assign a button to a macro Video

assign a macro to a button in word

Assign a button to a macro

Your browser does not support video. Install Microsoft Silverlight, Adobe Flash Player, or Internet Explorer 9.

In this final video, we’ll hook the macro up with a button and make it available in two places: In a custom group on the Developer tab, and on the Quick Access Toolbar.

Create or delete a macro

Edit a macro

Assign a macro to a button

Create and save all your macros in a single workbook

In this final video, we'll hook the macro up with a button and make it available in two places.

In a custom group on the ribbon that I'll create on the DEVELOPER tab, I'll call My Macros , and up here on the Quick Access Toolbar .

First, I'll create a custom group for the DEVELOPER tab.

I click the FILE tab, Options , Customize Ribbon , and then I make sure Developer is checked.

I click New Group and here is our new group.

I click Rename , and call it My Macros .

Now, let's find the macro and add it to this custom group.

I go over here and choose commands from Macros .

I select the "FillDaysRelativeR" macro that's stored in my 'Personal Workbook' and click Add .

Here it is, it's now in the group and I want to rename it.

I click Rename and call this "Fill Days".

You can have spaces in display names.

While I am at it, I'll replace the cryptic icon with this icon that looks a little bit like a calendar.

I click OK , click OK again and here's my macro button in my custom My Macro group.

I click it and it works.

Now I'll show you how to add the same macro to the Quick Access Toolbar , so it'll be up here next to Redo .

Click FILE and Options , and this time, click Quick Access Toolbar .

Again, I choose commands from Macros, and here's the macro in my personal workbook. Click Add .

To rename it, click Modify . Call it "Fill Days" and choose the same grid icon.

I click OK , and click OK again.

Now here it is, up on the Quick Access Toolbar .

I click it, and of course, it works great again.

Now you have a pretty good idea about how to implement macros in Excel.

Of course, there's always more to learn.

So check out the course summary at the end, and best of all, explore Excel 2013 on your own.

Facebook

Need more help?

Want more options.

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

assign a macro to a button in word

Microsoft 365 subscription benefits

assign a macro to a button in word

Microsoft 365 training

assign a macro to a button in word

Microsoft security

assign a macro to a button in word

Accessibility center

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

assign a macro to a button in word

Ask the Microsoft Community

assign a macro to a button in word

Microsoft Tech Community

assign a macro to a button in word

Windows Insiders

Microsoft 365 Insiders

Was this information helpful?

Thank you for your feedback.

IMAGES

  1. How to Create a Macro in Word

    assign a macro to a button in word

  2. How to Create a Macro in Word

    assign a macro to a button in word

  3. How To Insert A Macro In Word 2010

    assign a macro to a button in word

  4. Microsoft Office Tutorials: Assign a macro to a button

    assign a macro to a button in word

  5. How to Create and Run a Macro in Word

    assign a macro to a button in word

  6. How to Create and Run a Macro in Word

    assign a macro to a button in word

VIDEO

  1. how to create macro button in Ms word by Aryan Kumar #exceltech #exc #computer #excel #exceltips

  2. Enable Macro on Microsoft Word

  3. មេរៀនទើ ៣៣ របៀបចង Macros

  4. Excel Record Macro and Analyse the code Part 2

  5. How to add a button in excel

  6. Creat command button and assign macro in Excel

COMMENTS

  1. Assign a macro to a button

    Click File > Options > Quick Access Toolbar. In the Choose commands from list, click Macros. Select the macro you want to assign a button to. Click Add to move the macro to the list of buttons on the Quick Access Toolbar. To replace the default macro icon with a different button for your macro, click Modify. Under Symbol, select a button icon ...

  2. How to apply a button to run a macro code in Word document?

    1. Click where you want to use a button, and then press Ctrl +F9 key to insert a pair of braces, and then type the below text between the braces, see screenshot: MACROBUTTON MacroName Double-Click To Run Macro. Note: MacroName is the code name in your Word file that you want to run when clicking the button, please change it to your need.

  3. How to Create and Run a Macro in Word

    Select the Developer tab. Select the Macros button. Enter a meaningful name in Macro name: Leave the Macros in: as Normal.dotm so it will apply to all Word documents. Always enter a description in the Description: area. Select Create. The Microsoft Visual Basic for Applications development tool will open.

  4. Assigning a Macro to a Button in Your Text (Microsoft Word)

    To assign a command or macro to a button, and insert that button in your text, follow these steps: Figure out the name of the macro or Word command you want to use with the button. To find the correct macro or command names you can right click on a blank area of the ribbon then click on Customize (Word 2007) or Customize Quick Access Toolbar ...

  5. HOW TO USE COMMAND BUTTON IN WORD 2016

    đŸ”„đŸ”„ HOW TO USE COMMAND BUTTON IN WORD 2016 | INSERT COMMAND BUTTON IN MS WORDYou already know you can assign a macro to a button (a tool) on your toolbar. W...

  6. Assigning a Macro to a Button in Your Text (Microsoft Word)

    To assign a command or macro to a button, and insert that button in your text, follow these steps: Position the insertion point where you want the button to appear. Press Ctrl+F9 to insert a field. Between the field brackets, type MacroButton, then the name of the command or macro you want the button to execute.

  7. How to Assign a Macro to a Button in a Word Document

    Position your cursor where you would like the MacroButton to appear. Click CTRL + F9 to insert a field. Between the field brackets, key in the field name MacroButton and a space). Key in the name of the command or macro you want the button to executed. To find the correct macro or command names, you can right-click on a blank area of your ...

  8. Macros in Word

    Ever wanted to automate a series of repetitive tasks - Macros are fantastic! The date entry in this video is a single step, but long sequences of steps can b...

  9. Assign a Macro to a Button in Word 2013

    If you want to assign the macro to a button on a tab within the Ribbon, then first click the "Customize Ribbon" category at the left side of the "Word Options" dialog box. Next, use the "Choose commands from:" drop-down to select the "Macros" category. You should see the macros that you created appear within this column.

  10. Word 2019 and 365 Tutorial Assigning Macros Microsoft Training

    FREE Course! Click: https://www.teachucomp.com/free Learn how to assign macros in Microsoft Word 2019 & 365 at www.teachUcomp.com. Get the complete tutorial ...

  11. How to Create and Use Macros in Microsoft Word

    To do this, we click on "View," then "Macros," then "Record Macro.". We name our macro here. For this example we'll call it "CreateTable.". Underneath the naming box are two buttons, "Button" and "Keyboard.". This is where you pick if you want to activate your macro via a button within Word or by pressing a hotkey on ...

  12. Assigning a Macro to a Shortcut Key (Microsoft Word)

    When you first create a macro by recording it, Word gives you the opportunity to assign the macro to a specific key combination. If you later want to change the key combination, you can follow these steps: ... Near the bottom of the dialog box, click the Customize button. Word displays the Customize Keyboard dialog box. (See Figure 1.) Figure 1.

  13. Assign a macro to a button

    Click File > Options > Quick Access Toolbar. In the Choose commands from list, click Macros. Select the macro you want to assign a button to. Click Add to move the macro to the list of buttons on the Quick Access Toolbar. To replace the default macro icon with a different button for your macro, click Modify. Under Symbol, select a button icon ...

  14. How to add a macro button to toolbar or ribbon in Word?

    2. In Word 2007 (or Excel or PowerPoint), you can "Choose commands from" "Macros" when you customize the Quick Access Toolbar (the button bar above or below the ribbon). Share. Improve this answer. answered Jan 10, 2013 at 23:32. Scott - ХлаĐČĐ° ĐŁĐșŃ€Đ°Ń—ĐœŃ–.

  15. How to assign VBA to a keyboard shortcut in Microsoft Word?

    Click in the box for the new shortcut and press your shortcut combination. Look to see if already assigned. Click on the Assign button. Repeat steps 1-8 as needed. Then Close the Customize Keyboard dialog and OK your way out of the Customize the Ribbon dialog. If prompted, save changes to the template. Note, the article also contains steps for ...

  16. What are Microsoft Word macros?

    Assign a button or a keyboard shortcut to a macro. When you choose the former, it opens the Customize the Quick Access Toolbar menu. Select Add to slide it over the right window.

  17. Keyboard Macros Aren't Just for Programmers (Here's How I Use Them

    So, when I needed to affiliate or shorten a URL, I would start by using my copy macro, then click the button next to that to shorten or affiliate the URL, then click the next button to paste. I took something that would normally take about 6-10 keystrokes and shortened it to 3. That doesn't sound like a massive change, but it makes an ...

  18. Video: Assign a button to a macro

    Create or delete a macro. Edit a macro. Assign a macro to a button. Create and save all your macros in a single workbook. Training: In this final video, we'll hook the macro up with a button and make it available in two places: In a custom group on the Developer tab, and on the Quick Access Toolbar.