Object Linking and Embedding (OLE) enables you to create work in one application and share that work with another application. You can use the numbers in a worksheet to create a table in a printed report; import a database table for use in Excel; or even combine the contents of many kinds of documents, in many different applications, to create an annual report. Object linking and object embedding are two related techniques that seem to accomplish similar goals. The main difference between linking and embedding is where the data is stored.
Linked data is stored in a source file. When you link an object, a copy of the original data appears in the second (destination) application; the original data remains intact in the first (source) application. If you use object linking to copy a table of numbers from Excel to Word, for example, the data remains in Excel, but a copy of the table also appears in Word. To change the table in Word, you return to Excel and change the original numbers. Because a link has been set up between the two applications, any changes to the data in Excel change the table in Word.
Embedded objects become part of the destination document. When you embed an object, you create the object in the source application as you do when linking; however, there is only one copy of the object and that resides within the destination document. You can embed an Excel chart in a Word document. In Word, you create the object using Excel menus and tools. You then update the object and exit Excel. When you want to edit the embedded object, you double-click the chart in Word to open the Excel window in which the object resides.
In OLE 2, which is a more recent version of OLE, you also can drag and drop shared data between open applications. OLE 2 makes it easier to edit the objects you link and embed. Suppose you create a worksheet in Excel that you embed into a Word report. When you edit the worksheet from Word, OLE 2 provides appropriate Excel menus that enable you to edit the worksheet more quickly and easily than if you switch to the actual source program. Many of the applications you use in Windows 95, such as Excel 97 and Word 97, use OLE 2.
NOTE: The general techniques you learn in this section apply to other Microsoft Office applications (such as Word, PowerPoint, and Access) as well as Windows applications from other software developers (such as Excel, WordPerfect, and Approach) that support OLE. Consult the user manual for the application to see whether it is OLE-compatible.
If you want to create a worksheet displaying ranges of data from multiple worksheets, you can capture a picture of the ranges from each worksheet and combine them onto one worksheet as linked objects. You also can use these captured cell pictures in other Office applications, such as Microsoft Word.
Capturing cell pictures provides several advantages over creating formula links to cells in other worksheets. The linked cell pictures can be opened and updated quickly--you can double-click the cell picture to access and modify the source information. Linked cell pictures are actually objects that can easily be moved or resized, which facilitates layout. In addition, you can format linked cell pictures by using many of the same features as text boxes.
The cell picture includes only the visible information in the captured cells, including cell gridlines. You may want to omit the gridlines before you capture the picture (see "Hiding: Gridlines" in the "Customizing" section). You also may want to resize columns or rows before capturing the cell picture in order to improve the appearance of the linked picture (see "Adjusting: Column Widths" and "Adjusting: Row Heights" in the "Editing Workbooks" section).
TIP: If you want to copy the picture to a document in another Office application, copy the Excel range to the Clipboard; then choose Edit, Paste Special in the other application. Click Paste Link; then in the As list box, select Picture. Click OK.
You can update information in the source worksheet that contains the data linked to a cell picture, and have those changes reflected immediately in the cell picture. You don't need to remember where the source data is located, because you can activate the source worksheet directly from the cell picture. This feature is especially convenient if you need to update several cell pictures contained in the same worksheet. (See "Cell Pictures: Capturing a Picture of Cells" before you complete this task.)
You can use the mouse to move or copy information from one application to another using a simple drag-and-drop operation, as long as both applications support OLE.
TIP: To more easily arrange the two applications on-screen, minimize all applications except the two you are working with. Right-click in the Windows taskbar and choose either Tile Horizontally or Tile Vertically.
When you link or embed an object in an Excel worksheet, you can edit the object or the linked data using the data's original application. This enables you to use features designed for this specific type of data. You can edit a linked object by changing and then updating the original object or by editing the link itself.
Objects linked into Excel update automatically, by default. When you change the source document and save the file, the object embedded in Excel updates to reflect the change.
TIP: To quickly access all the commands that apply to an embedded object, right-click the object to display the object's shortcut menu.
After you embed data from another application into Excel, the data is part of the Excel worksheet. You can edit the embedded data by starting the other application from within Excel. You can embed an object into an Excel document in two ways: by using the Insert command and creating the embedded object from within Excel; or by opening an application that contains an existing object, and then copying and pasting the object into Excel. Objects you embed in Excel appear as pictures that you can resize and move.
If you need to create links to individual cells or links within formulas, you can use the pointing method to create the links. You can point to cells in other workbooks and create the links, just as you can point to any cell in the current workbook. To point to a cell so that it is included in a formula, click it as you build the formula.
(See also "Formulas: Entering Formulas" in the "Formula & Function Management" section.)
You can link an Excel cell or range in a source workbook to a cell or range in a destination workbook by using the Copy and Paste Link commands. The Paste Special dialog box used in this procedure enables you to choose which components of a cell or range you want to paste link, such as all, formulas, values, or formats. You also can specify a mathematical operation to perform on the link, if desired.
Through object linking, a Windows application can send data to or receive data from another Windows application that is capable of OLE. Excel can create links by using its Edit, Copy and Paste Special commands as long as the other Windows application also has OLE commands available. In this case, creating object links between two Windows applications is as easy as linking two worksheets.
NOTE: If the Paste Link option is not available in the Edit menu after you copy data from another Windows application to Excel, the source application doesn't support OLE through menus; you cannot paste the link into Excel.
When you open a workbook containing linked data, you update the linked data in different ways. If the source workbook is already open, the destination workbook automatically updates when you open it. If the source workbook is not open when you open the destination workbook, you can choose to keep the old values or update links to files on disk.
NOTE: Be sure that the destination workbook is the active workbook. If a workbook without links is active, the Edit, Links command is unavailable.
To maintain linked workbooks, you need to know how to re-establish lost links and how to update links. If you rename or move source workbooks to different folders, destination workbooks cannot automatically find the new location of the source data. These links must be reestablished.
TIP: To update an active destination workbook if the source workbook is unopened, choose Edit, Links. Then, select the source workbook and click the Update Now button.
©Copyright, Macmillan Computer Publishing. All rights reserved.