How to create a shortcut in a macro | Automatically save or close a macro

What is a macro?

There are commands or instructions grouped into a single function to be performed by pressing a single button created for this purpose.

The advantage of this is that it saves time, as it is a repeating function, you will run it many times, this will make it easy for you to do it quickly, just by clicking on the button you have designed for that function.

Since they are routine activities performed in a given job, they can vary from calculations, filling schemes, formulas, adding records or deleting files and you can even use a macro to save a book. That is, they are a series of shortened commands in a single click, sequential in a sense already encoded previously within a program.




How to create a shortcut in a macro | Automatically save or close a macro

As the needs vary depending on what you are doing, we can create a macro with VBA in Excel to speed up the work, this happens when they are functions that repeat continuously. You can also use Loop White statement in VBA Excel Macro in an easy way.

We already know that this is a macro, the advantages of doing so, in addition to the fact that during its creation we create custom functions to perform certain activities within a program. Now we will learn how to create a macro and also how to create a shortcut.

How to create and create quick access to Macros?

Here are some short steps to create a macro:

Step 1

In Word, in the title view you press it, there you will see at the end of the left side of the screen an icon with the name macro. There you will see an item that says to record macros, press it.



Step 2

You will now see a window asking you to name the macro they are creating. You also need to make sure that at the point where you will save the macro, tell all documents so you can use it in several.


How to create a shortcut in a macro | Automatically save or close a macro

3 pass

So in that same window below there is an icon with a hammer, you have to press it to start the execution of the macro. So you have to click where it indicates the new macro, so you also have to press the button that says add, the button that says edit will be enabled, you press it, there several icons appear, choose the one you like best for your button macro.

4 pass

To select the icon you have to press it twice, in this way the icon of your preference will be selected. Now we can start saving what we need here, let's just select the step keys we want run in Word pressing the keys and clicks will be recorded.

5 pass

This step should not be done with the mouse, as this will not record anything, use the keyboard to record macros. When the recording is running, go to the options view after the macro, press stop recording. The macro button should already appear on the Quick Access Toolbar.


We have seen how easy it is create a shortcut in a macro to simplify a little the tasks that are repeated over and over when working in a program or doing different things in Word.


The positive aspects of this option are many, it saves us time, speeds up the work we perform, as well as optimizing it, generating quality.

We can create many macros for different things we do, we can also save them so that if there are other similar activities we can use them. Also if it is not suitable we can close it.


Since the tasks that can be performed with a macro are many, it makes it versatile, practical, we can all use it. If you are interested in similar topics, this could be the one about how to safely hide an Excel sheet with a macro.

Etiquetas Office applications
add a comment of How to create a shortcut in a macro | Automatically save or close a macro
Comment sent successfully! We will review it in the next few hours.