How to Open Excel from Word Macro

Microsoft Word is generally used to create documents. The program allows a user to create macros to assist in performing frequent task automatically. In this tutorial we will learn how to open excel from word using a macro.

Step # 1 – Enabling developer

To access the macros section, we need to navigate to the developer tab in the ribbon bar. By default this tab is not visible to most users. It can be turned on by navigating to the “file” tab, then clicking the options button. This will open up a new popup window. There we must select the customize ribbon option, and lastly tick the developer check box listed on the right column of the window.

After that, close the popup window and the developer tab would appear.

Customizing ribbon

Step # 2 – Create macro

Now navigate to the developer tab and locate the macros drop down button. Then click the macros button in the drop down menu and open a macros list. Here we can create, edit, run, and delete macros. Let’s name our macro openExcel and select create.

New macro

Step # 3 – Writing Command

The macro now needs to be defined, and for that Word has opened a Visual Basic editor with an empty sub routine defined in the name of the macro. We will use the shell function to open Excel. The function requires a path to the file in order to locate and open the program executable.

So the command including the path will be:

Shell (“C:\Program Files (x86)\Microsoft Office\office14\Excel.exe”)

The image below shows the command for word to excel macro

Creating the sub routine

And this was all about word to excel macro.