A Guide To Office OLE Exploring Application Integration Helen Bradley
Wed 7/3/02 -- Object Linking and Embedding, commonly called OLE, is Windows technospeak for taking part of one file and putting it inside another -- adding an Excel chart to a PowerPoint slide or Word document, for instance -- in a way that inserts editable or "live" data instead of just a cut-and-pasted snapshot. It's a maneuver that's often useful, and that you can perform in a number of ways. But before we look at the how-to side, let's see how linking and embedding differ from one another and the impact on how you'll use them.
What's the difference? While linking and embedding have the same immediate result -- a copy of data from one application appears inside a document created in another -- what happens behind the scenes is not the same. The differences can range from unimportant to critical, depending on your particular application and needs.
When you embed a data object from one program -- called the server application -- within a file created by another -- called the container application -- the object is physically located inside the file in the latter program. By contrast, when you link, the container application file has only a pointer to the server application and file, which resides somewhere else.
Why it matters. The difference between linking and embedding affects you in several ways. When you embed an object, the container file size is bigger; when you link, the container document takes less disk space because it holds only a link instead of the object itself.
More important, when you move a file with an embedded object to another PC, the object moves with it. When you move a file with a linked object to another computer, the linked file stays behind and the link will be broken -- unless the linked file is on a network server accessible to both computers.
Linking versus embedding for editing or updating. The most significant difference between linking and embedding involves what happens when you edit the object. Double-click a linked object, and the server application opens with the original file loaded. Any changes you make affect the original file (say, your Excel worksheet), as well as appearing in the linked version in the container application (say, the Excel chart inside your PowerPoint presentation). Similarly, if you open and alter the original file using the server application, the changes will be visible the next time you open the container file.
When you double-click an embedded object, the server application opens, but any changes you make affect only the embedded object -- not the original file from which the object was created. The embedding process has severed all links between the original file and the object in the container file, so changes to either will not appear in the other.
How to embed and edit an object. You can embed an object using drag and drop (assuming your display's big enough to accommodate adjacent program windows). For example, with both an Excel chart and a Word document open on screen, select the chart, hold the Ctrl key, and drag it into the document. To edit the chart within Word, double-click it (or choose Edit/Chart Object/Edit); Excel opens inside Word and the entire workbook is available for editing.
How to link and edit an object. To link an object, open it in the server application (for instance, launching Excel and opening your workbook); select the chart; and choose Edit/Copy.
Switch to Word, with the cursor where you want the chart to appear, and choose Edit/Paste Special. From the resulting dialog, choose Paste Link; from the "As:" list, choose how you want the item to appear -- in most cases, as an application object. Click OK to create the link.
In Word, pressing Shift-F9 toggles between displaying field codes (i.e., the code that creates the link) and displaying the results. Press this to toggle between viewing the link code and the chart itself.
Edit the chart by altering the original Excel workbook, or by double-clicking the linked object. This opens Excel, which displays the original file for editing. Make your changes, save them, and then return to Word (if you don't save the changes, they'll be lost).
Word does PowerPoint handouts. PowerPoint can automatically send slides and notes to Word as either embedded or linked objects, so you can create more fancily formatted handouts than PowerPoint alone permits. Open PowerPoint and your presentation file and choose File/Send To/Microsoft Word.
The Write-Up dialog offers options for the slide/notes layout in Word and for embedding (choose Paste) or linking (choose Paste Link) the slides. If you choose Paste Link, changes to a slide in the presentation will affect the slide displayed in your Word file.
PowerPoint does Word tables. It's also possible to create an embedded object from inside the container application. For example, to create an embedded Word table while working with PowerPoint, choose Insert/Object and click Create New. From the "Object type" list, choose Microsoft Word Document and click OK. Notice that the PowerPoint menus change to Word menus, so you can create the table using your usual Word tools. When you're done, click somewhere on your slide outside the object border to return to using the PowerPoint menus.