In this article, we will present you the way of how to invoke an application from MS Word by running a macro.
When you are creating a Word document, you may have to switch from Word window to others so as to run another application. Some of you may find it not convenient. Then, we will demonstrate you a quick way that is to use the macro in Word.
Here comes detailed explanation:
Create a Macro Command
In order to run a macro command in Word, you must first create one.
- First and foremost, open up a Word document.
- Then press “Alt+F8” to open the “Macros” window.
- Next, name the new macro.
- Click “Create” on the right side. And the “Microsoft Visual Basic for Applications” window will pop up.
- Now, in the area above “End Sub” input a code containing the exact location as well as the name of the program you want to call in.
- Then click “Save” option.
- Click “Run Sub” and you will be greeted with the “Macros” window.
- Click “Run” button on the right side column. Then you have the program run.
Save the Macro Command to “Customize Ribbon”
Certainly, saving the macro command to “Customize Ribbon” can prevent from much trouble the next time you want to call the same program in Word.
Following are the specific steps for you to follow:
- In your Word window, click “File”.
- Then click “Options” on the left column to open the “Word Options” window.
- Click “Customize Ribbon”.
- Next, choose “Macros” in the list box of “Choose commands from”. Now the newly created macro command will show on the box below.
- Choose a location in the group boxes below “Customize the Ribbon” for your new macro command.
- Then click “New Tab” or “New Group” button.
- Click the new macro command on the left box.
- And continue to click “Add” button in the middle to move the macro to the new location.
- In the new location, right click the macro command.
- Click “Rename” on the menu.
- In the “Rename” window, choose a symbol for your macro command.
- Then type the macro name in “Display name” text box.
- Click “OK”.
- Now back to the Word window, you can see the “New Tab” option on the “Toolbar”. Click the macro button and you can start the program.
Fix Corrupt Word Documents
Invoking a program in Word can bring high risk of getting Word documents corrupted. Once you have a damaged file, you may want to fix it immediately. Luckily, there are many recovery options for you nowadays. You can either use the built-in function in Word or some third-party repair tools for your word recovery.
Author Introduction:
Vera Chen is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including excel recovery and pdf repair software products. For more information visit www.datanumen.com