Skip to content

How To Blog

how to

  • 4 Lesser-Known Mechanical Keyboard Brands & Why They’re Worth Trying Product Reviews
  • 100 Most Popular Internet slangs that Everyone should know How-To
  • Best calculator ribbons 2020 black
  • Top 5 3D Modeling Apps for iPad Pro How-To
  • How to create line graphs in Google Sheets Google Software/Tips
  • iPad 2 – Cannot Connect to WPA2-PSK AES Encrypted Wi-Fi Network? Gadgets
  • How to get the most out of Duolingo 2021 Computer Tips
  • A Problem Has Been Detected and Windows Has Been Shutdown to Prevent Damages to Your Computer Windows XP Tips

How to create and run a macro in MS Word

Posted on November 13, 2020November 13, 2020 By blog_786 No Comments on How to create and run a macro in MS Word

How to create and run a macro in MS Word.

If you work a lot with Microsoft Word and do the same thing all the time, create a macro. Macro is short for macroinstruction, which means a series of instructions to complete a task.

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

How to create and run a macro in MS Word

Aren’t Macros Dangerous?

Have you heard that macros are bad because they can contain viruses? While you should be careful when opening Office documents from unknown people as they may contain malicious macros, this is not a problem here. You make your own macro to know that it is not a virus.

How To Record A Macro in Word

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

  1. With Word open, click the View tab.
  2. Click the down arrow below the Macros button.
  3. Select Record Macro … a new window will open.

How to create and run a macro in MS Word

  1. In the Macro name: field, enter a meaningful name for the macro. Spaces are not allowed. Use underscore or dash.
  2. In the “Save Macro To:” drop-down list, you can choose which documents you want to use for this macro. If you select All Documents (Normal.dotm), the macro will be available to you in every new Word document that you create from now on. If you select one document, it will only apply to that single document. It is usually best to select “All Documents”.

How to create and run a macro in MS Word

  1. In the Description: field, specify what the macro does. This is a simple macro with a descriptive name, but as you get more comfortable with the macros, you will tackle more complex tasks, so a description is always a good idea.
  2. You can select “Assign Macro” to any button. you create with a button or hotkeys that you can select with a keyboard button. There are many keyboard shortcuts already available for Word, so a button works best. Select button. A new window will open titled “Word Options”.

How to create and run a macro in MS Word

  1. This is where you assign a button to the macro on the Word ribbon. Select “Customize Ribbon”.
  2. From the Select Commands From: drop-down list, select Macros. This will show us our macros in the area below it.

How to create and run a macro in MS Word

  1. You need somewhere on the ribbon to place the macro. For this example, select Home in the Main Tabs area. Then select “New Group”.
  2. Select Rename to give it a meaningful name.
  3. In the Rename window, select one of the icons to represent the group, then enter My Macros in the Display Name field.
  4. Click OK to apply it. You will see the change in the main tabs area.

How to create and run a macro in MS Word

  1. With the new My Macros selected in the Main Tabs area, select the Normal.NewMacros.Insert_Signature macro.
  2. Select Add to add it to the My Macros group.

How to create and run a macro in MS Word

  1. Of course you want to rename it. With the macro selected in the Main Tabs area, select Rename ….
  2. In the Rename window, select the icon and enter a simple name in the Display Name: field.
  3. Click OK to commit the change. You will see the change in the main tabs area.
  4. Click OK below the main tabs area to complete the button for the macro.

How to create and run a macro in MS Word

  1. Create any signature block you want. Add a scan of your signature or other images. As you wish. When done, click the down arrow below the Macros button.
  2. Select Stop Recording. This is it. The signature insert macro has been created.

How to create and run a macro in MS Word

  1. Check this out by finding the Insert Signature button you created on the Home tab and select it. Your signature block should magically look exactly the way you created it.

How to create and run a macro in MS Word

How To Write a Macro

For most macros, recording is the most efficient way to create them. At the end of the day, you will want to do something more difficult. To do this, you must write a macro in Visual Basic for Applications (VBA). We’ve got the best beginner’s guide to VBA, so bookmark it. Let’s create a macro that will show us the average number of words in a sentence to help us determine when we are verbose.

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

How to create and run a macro in MS Word

  1. In the lower left corner, select Options.

How to create and run a macro in MS Word

  1. In the window that opens, select “Customize Ribbon”.
  2. Find “Developer” on the right and check the box next to it.
  3. Select OK to close the window. The Developer tab will open.

How to create and run a macro in MS Word

  1. Select the Developer tab.
  2. Click the Macros button.

How to create and run a macro in MS Word

  1. Enter a meaningful name in the Macro Name field: leave the macro in: as Normal.dotm so that it applies to all Word documents. Always enter a description in the Description: area.
  2. Select New. The Microsoft Visual Basic for Applications Development Tool opens.

How to create and run a macro in MS Word

  1. The code shown in the green boxes below should already be there with a little space in between. Copy and paste the following code here:

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 number of words in a sentence” + Str (Int (numWords / numSentences)) + “. Less than 15 is best. ”

  1. Click the Run button to test the code. If it doesn’t work as expected, edit the code until it runs the way you want it to.

How to create and run a macro in MS Word

  1. Click the Save button and close the design window.

How to create and run a macro in MS Word

  1. Create a button on the Word ribbon using the same method shown in the How to Record Macro instructions above.
  2. Find the button you just created and check it out.

How to create and run a macro in MS Word

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

By default, Word saves the file with a .docx extension, which prevents macros from running automatically. If you want the macro to run, you need to change the file type to Word Macro-Enabled Document (* .docm).

This file type exists in part to combat macro security issues. If you see this file extension in a document that you did not expect to receive, be suspicious.

How to create and run a macro in MS Word

What Else Can I Do With Macros?

You can create macros in Excel, Outlook, and even PowerPoint. Anything you do manually now, you should be able to record or write a macro to do this. Using macros in Word along with the excellent Windows keyboard shortcuts will increase your productivity tenfold.

How to create and run a macro in MS Word

How to create and run a macro in MS Word

Office Tips Tags:Arenrsquot Macros Dangerous?, How to create and run a macro in MS Word, How To Record A Macro in Word, How To Write a Macro, My Macro Doesnrsquot Work When I Save My Word Document, What Else Can I Do With Macros?

Post navigation

Previous Post: How to fix a fatal Javascript Discord error
Next Post: Have a great time with seven great virtual dates

Related Posts

  • How to Trace Dependents in Excel Office Tips
  • How to Use the CONCATENATE Function in Google Sheets Office Tips
  • When to Use Index-Match Instead of VLOOKUP in Excel Office Tips
  • Paste Text into Word Without Formatting Office Tips
  • How to Export Your Emails from Microsoft Outlook to CSV or PST Office Tips
  • How To Embed a YouTube Video In Microsoft PowerPoint Office Tips

Leave a Reply Cancel reply

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

  • Apple Watch
  • Computer Tips
  • Cool Websites
  • Free Software Downloads
  • Gadgets
  • Gaming
  • General Software
  • Google Software/Tips
  • Hardware
  • How-To
  • iOS
  • iPad
  • iPhone
  • Linux Tips
  • macOS
  • MS Office Tips
  • Networking
  • Product Reviews
  • Reviews
  • Safari
  • Smart Home
  • Smartphones
  • Software Reviews
  • technology
  • text
  • Tutorials
  • Uncategorized
  • Urdu Books PDF
  • Web Site Tips
  • Windows
  • Windows 10
  • January 2023
  • December 2022
  • November 2022
  • September 2022
  • August 2022
  • July 2022
  • June 2022
  • May 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • July 2021
  • June 2021
  • May 2021
  • April 2021
  • March 2021
  • February 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • May 2020
  • April 2020
  • March 2020
  • December 2019
  • July 2019
  • May 2019
  • April 2019
  • January 2019
  • December 2018
  • November 2018
  • October 2018

2021 Android ) Apple apps Best browser change Chrome Closing words Concluding remarks Download email Error Facebook From Google Image Internet Keyboard Mac make Movies Music online Packaging phone? Photos Print Shortcuts sites Switch Time Tips Tricks turn using Video Videos Watch What With Word Working? your YouTube

  • How to add titles and graphics to your video How-To
  • Best calculator ti-83 2020

    Best calculator ti-83 2020

  • 10 Little-Known Spotify Tips and Tricks Computer Tips
  • How to configure a surround sound system Computer Tips
  • Gst Calculator Nz – the Conspiracy

    Gst Calculator Nz.GST (Goods and services tax).GST is a tax on most goods and services in New Zealand, most imported goods, and certain imported services.It is added to the price of taxable goods and services at a rate of 15%. We refer to taxable goods and services as ‘taxable supplies’ till October 2018.how to calculate gst....<p class="more-link-wrap"><a href="https://blog.pkrtousd.gb.net/gst-calculator-nz-the-conspiracy/" class="more-link">Read More<span class="screen-reader-text"> “Gst Calculator Nz – the Conspiracy”</span> »</a></p>

  • 10 Ways To Customize Your Windows 10 Start Menu Windows 10
  • 10 online ways to improve memory for seniors through (tools and apps) Software Reviews
  • How to fix google backup and sync not signed Google Software/Tips

Copyright © 2023 How To Blog.

Powered by PressBook News WordPress theme

Manage Cookie Consent
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
Manage options Manage services Manage vendors Read more about these purposes
View preferences
{title} {title} {title}
Go to mobile version