In spite of Microsoft Word’s ability to handle images, tables, and databases, it is best at word processing. Similarly, Excel can handle text, but is better at manipulating worksheets. If your needs are simple, you can use secondary components of a program, but when you need more options, you should use a program designed specifically for those features. If you are writing a document in Word and need a complex table, you can create a worksheet in Excel and embed the worksheet into your document.
An embedded object is a document or part of a document stored within another program’s document. In Word, you can embed all kinds of objects — graphics, sounds, videos, etc. The only requirement is that the program that creates the object is installed on your computer.
Figure 1 illustrates a Microsoft Word document. The user would like to insert the Microsoft Excel worksheet illustrated in Figure 2.
Figure 1: A Word document before inserting an Excel worksheet
Figure 2: Microsoft Excel worksheet to be inserted
Clicking Insert, Object displays a dialog box with two tabs that lets you either create a new object or insert an existing object. If you display the Create from File tab, you have to enter, or browse to, the filename of the object to be inserted. Unfortunately, when you embed an object this way, it is very difficult to control the size of the object to be embedded. In this case, you may wind up with a lot of empty columns and rows embedded along with the data.
A much better method of embedding follows:
- Open the worksheet in Excel
- Select the cells to be embedded
- Click the Copy toolbar button
- Switch to the Word document
- Click the insertion point where you want the worksheet to be
- Click Edit, Paste Special, and select Microsoft Excel Worksheet Object
(Note: If you click the Paste option, the worksheet will be inserted as a regular Microsoft Word table.)
Figure 3 illustrates the results of inserting an Excel worksheet into the Word document. At first it may seem that you have nothing more than a Word table.
Figure 3: Word document with embedded Excel worksheet
Your first hint that embedding is something different becomes evident when you click on the “table.” Instead of moving the insertion point into a cell, the entire table is selected, with sizing handles surrounding the worksheet. You can drag the border of the worksheet to position it on the document or drag the handles to enlarge or shrink its size. When you double-click the worksheet, however, the full power of embedding becomes apparent. For not only can you click on individual cells, but you now have Microsoft Excel toolbars replacing the Microsoft Word toolbars. If you look at the title bar, you will see that you are still in Word. Figure 4 shows these Excel tools within the Word window.
Figure 4: Microsoft Excel toolbars within the Microsoft Word window
For example, when you type, you will see the data entered in the formula box. If you were typing in a cell using Word’s tools, the characters would go directly into the cell.
Additionally, the menu is not the normal Word menu, but a combination of a Word File menu and Excel menus.
Linking a Worksheet Object to its Source
Once an object is embedded, the data becomes set in the document, unless you change it. That is, if you were to make changes to the original worksheet, the changes would not be reflected in the Word document object, unless you link the object to the source file. When linked, the object is reinserted into the document every time the document is opened, thus ensuring that the most recent version of the object is used. Figure 5 displays the Paste Special dialog box with its option button to link the object to its source file.
Figure 5: The Paste Special dialog box with the Paste link option
At first glance, a linked object looks just like an embedded one. When you double-click on the linked object, however, the worksheet is opened in Microsoft Excel. Remember, when you double-click an embedded worksheet, you get to use Excel tools but you remain in Word. With the linked worksheet you make changes entirely independent of Word.
Embedding a New Excel Worksheet
So far, it’s assumed that the Excel worksheet you want to embed already exists as a file on your computer. But what if you want the power of Excel tools while you create a new table in a Word document? You could use Insert, Object and then click the Create New tab and the Microsoft Excel Worksheet option. Creating new worksheets within Word is so popular, however, that there is a special button on the Word Standard toolbar to do this. Figure 6 shows you this button.
Figure 6: The Insert Microsoft Excel Worksheet toolbar button
When you click this button you can drag down and to the right to set up a worksheet of up to five columns and four rows, as in Figure 7.
Figure 7: A Word document with a new Excel table embedded
Once you have embedded the new Excel worksheet, you can drag the handles and resize the columns and rows to enlarge the dimensions of the worksheet. As with all embedded objects (but not linked), you can double-click to use Excel tools to enter data, format cells, sort, and so on.
What Else Can You Embed?
There are a number of types of objects other than worksheets that you can embed and/or link. Here are just a few:
- Microsoft Paint bitmapped image
- Microsoft PowerPoint slide
- A media clip
- A video clip
- A sound file
- Another Word document
- A wide variety of files depending on other compatible software installed on your computer