Create, edit, and control OLE objects

You can use Object Linking and Embedding (OLE) (OLE: A program-integration technology that you can use to share information between programs. All Office programs support OLE, so you can share information through linked and embedded objects.) to include content from other programs, such as Microsoft Office Word, in Microsoft Office Excel.

What do you want to do?


Learn more about OLE

OLE is supported by many different programs, and OLE is used to make content that is created in one program available in another program. For example, you can insert an Office Word document in an Office Excel workbook. To see what types of content that you can insert, click Object in the Text group on the Insert tab. Only programs that are installed on your computer and that support OLE objects appear in the Object type box.

Top of Page Top of Page

Linked and embedded objects

If you copy information between Excel or any program that supports OLE, such as Word, you can copy the information as either a linked object (linked object: An object that is created in a source file and inserted into a destination file, while maintaining a connection between the two files. The linked object in the destination file can be updated when the source file is updated.) or an embedded object (embedded object: Information (object) contained in a source file and inserted into a destination file. Once embedded, the object becomes part of the destination file. Changes you make to the embedded object are reflected in the destination file.). The main differences between linked objects and embedded objects are where the data is stored and how the object is updated after you place it in the destination file (destination file: The file that a linked or embedded object is inserted into. The source file contains the information that is used to create the object. When you change information in a destination file, the information is not updated in the source file.). Embedded objects are stored in the workbook that they are inserted in, and they are not updated. Linked objects remain as separate files, and they can be updated.


Linked and embedded objects in a document

Linked and embedded objects in a document

Callout 1 An embedded object has no connection to the source file.
Callout 2 A linked object is linked to the source file.
Callout 3 The source file updates the linked object.

Top of Page Top of Page

When to use linked objects

If you want the information in your destination file (destination file: The file that a linked or embedded object is inserted into. The source file contains the information that is used to create the object. When you change information in a destination file, the information is not updated in the source file.) to be updated when the data in the source file (source file: The file that contains information that was used to create a linked or embedded object. When you update the information in the source file, you can also update the linked object in the destination file.) changes, use linked objects.

With a linked object, the original information remains stored in the source file. The destination file displays a representation of the linked information but stores only the location of the original data (and the size if the object is an Excel chart object). The source file must remain available on your computer or network to maintain the link to the original data.

The linked information can be updated automatically if you change the original data in the source file. For example, if you select a paragraph in a Word document and then paste the paragraph as a linked object in an Excel workbook, the information can be updated in Excel if you change the information in your Word document.

Top of Page Top of Page

When to use embedded objects

If you don't want to update the copied data when it changes in the source file, use an embedded object. The version of the source is embedded entirely in the workbook. If you copy information as an embedded object, the destination file requires more disk space than if you link the information.

When a user opens the file on another computer, he can view the embedded object without having access to the original data. Because an embedded object has no links to the source file, the object is not updated if you change the original data. To change an embedded object, double-click the object to open and edit it in the source program. The source program (or another program capable of editing the object) must be installed on your computer.

Top of Page Top of Page

Changing the way that an OLE object is displayed

You can display a linked object (linked object: An object that is created in a source file and inserted into a destination file, while maintaining a connection between the two files. The linked object in the destination file can be updated when the source file is updated.) or embedded object (embedded object: Information (object) contained in a source file and inserted into a destination file. Once embedded, the object becomes part of the destination file. Changes you make to the embedded object are reflected in the destination file.) in a workbook exactly as it appears in the source program (source program: The program used to create a linked object or embedded object. To edit the object, you must have the source program installed on your computer.) or as an icon. If the workbook will be viewed online, and you don't intend to print the workbook, you can display the object as an icon. This minimizes the amount of display space that the object occupies. Viewers who want to display the information can double-click the icon.

Top of Page Top of Page

Link or embed content from another program by using OLE

You can link or embed all or part of the content from another program.

Create a link to content from another program

  1. Click in the worksheet where you want to place the linked object (linked object: An object that is created in a source file and inserted into a destination file, while maintaining a connection between the two files. The linked object in the destination file can be updated when the source file is updated.).
  2. On the Insert tab, in the Text group, click Object.

Excel Ribbon Image

  1. Click the Create from File tab.
  2. In the File name box, type the name of the file, or click Browse to select from a list.
  3. Select the Link to file check box.
  4. Do one of the following:
    • To display the content, clear the Display as icon check box.
    • To display an icon, select the Display as icon check box.

To change the default icon image or label, click Change Icon, and then click the icon that you want from the Icon list, or type a label in the Caption box.

 Note   You cannot use the Object command to insert graphics and certain types of files. To insert a graphic or file, on the Insert tab, in the Illustrations group, click Picture.

Top of Page Top of Page

Embed content from another program

  1. Click in the worksheet where you want to place the embedded object (embedded object: Information (object) contained in a source file and inserted into a destination file. Once embedded, the object becomes part of the destination file. Changes you make to the embedded object are reflected in the destination file.).
  2. On the Insert tab, in the Text group, click Object.

Excel Ribbon Image

  1. If the document does not already exist, click the Create New tab. In the Object type box, click the type of object that you want to create.

If the document already exists, click the Create from File tab. In the File name box, type the name of the file, or click Browse to select from a list.

  1. Clear the Link to file check box.
  2. Do one of the following:
    • To display the content, clear the Display as icon check box.
    • To display an icon, select the Display as icon check box.To change the default icon image or label, click Change Icon, and then click the icon that you want from the Icon list, or type a label in the Caption box.

Top of Page Top of Page

Link or embed partial content from another program

  1. From a program other than Excel, select the information that you want to copy as a linked (linked object: An object that is created in a source file and inserted into a destination file, while maintaining a connection between the two files. The linked object in the destination file can be updated when the source file is updated.) or embedded object (embedded object: Information (object) contained in a source file and inserted into a destination file. Once embedded, the object becomes part of the destination file. Changes you make to the embedded object are reflected in the destination file.).
  2. On the Home tab, in the Clipboard group, click Copy.

Excel Ribbon Image

  1. Switch to the worksheet that you want to place the information in, and then click where you want the information to appear.
  2. On the Home tab, in the Clipboard group, click the arrow below Paste, and then click Paste Special.
  1. Do one of the following:
    • To paste the information as a linked object, click Paste link.
    • To paste the information as an embedded object, click Paste. In the As box, click the entry with the word "object" in its name. For example, if you copied the information from a Word document, click Microsoft Word Document Object.

Top of Page Top of Page

Change the way that an OLE object is displayed

  1. Right-click the icon or object, point to object type Object (for example, Document Object), and then click Convert.
  2. Do one of the following:
    • To display the content, clear the Display as icon check box.
    • To display an icon, select the Display as icon check box.

To change the default icon image or label, click Change Icon, and then click the icon that you want from the Icon list, or type a label in the Caption box.

Top of Page Top of Page

Control updates to linked objects

You can set links to other programs to be updated in the following ways: automatically, when you open the destination file (destination file: The file that a linked or embedded object is inserted into. The source file contains the information that is used to create the object. When you change information in a destination file, the information is not updated in the source file.); manually, when you want to see the previous data before updating with the new data from the source file (source file: The file that contains information that was used to create a linked or embedded object. When you update the information in the source file, you can also update the linked object in the destination file.); or when you specifically request the update, regardless of whether automatic or manual updating is turned on.

Set a link to another program to be updated manually

  1. On the Data tab, in the Connections group, click Edit Links.

Excel Ribbon Image

 Note   The Edit Links command is unavailable if your file does not contain links to other files.

  1. In the Source list, click the linked object that you want to update. An A in the Update column means that the link is automatic, and an M in the Update column means that the link is set to Manual update.

 Tip   To select multiple linked objects, hold down CTRL and click each linked object. To select all linked objects, press CTRL+A.

  1. To update a linked object only when you click Update Values, click Manual.

Top of Page Top of Page

Set a link to another program to be updated automatically

  1. On the Data tab, in the Connections group, click Edit Links.

Excel Ribbon Image

 Note   The Edit Links command is unavailable if your file does not contain links to other files.

  1. In the Source list, click the linked object that you want to update. An A in the Update column means that the link will update automatically, and an M in the Update column means that the link must be updated manually.

 Tip   To select multiple linked objects, hold down CTRL and click each linked object. To select all linked objects, press CTRL+A.

  1. Click OK.

ShowIssue: I can't update the automatic links on my worksheet

The Automatic option can be overridden by the Update links to other documents Excel option.

To ensure that automatic links to OLE objects can be automatically updated:

  1. Click the Microsoft Office Button Button image, click Excel Options, and then click the Advanced category.
  1. Under When calculating this workbook, make sure that the Update links to other documents check box is selected.

Top of Page Top of Page

Update a link to another program now

  1. On the Data tab, in the Connections group, click Edit Links.

Excel Ribbon Image

 Note   The Edit Links command is unavailable if your file does not contain linked information.

  1. In the Source list, click the linked object that you want to update.

 Tip   To select multiple linked objects, hold down CTRL and click each linked object. To select all linked objects, press CTRL+A.

  1. Click Update Values.

Top of Page Top of Page

Edit content from an OLE program

While you are in Excel, you can change the content linked or embedded from another program.

Edit a linked object in the source program

  1. On the Data tab, in the Connections group, click Edit Links.

Excel Ribbon Image

 Note   The Edit Links command is unavailable if your file does not contain linked information.

  1. In the Source file list, click the source for the linked object (linked object: An object that is created in a source file and inserted into a destination file, while maintaining a connection between the two files. The linked object in the destination file can be updated when the source file is updated.), and then click Open Source.
  2. Make the changes that you want to the linked object.
  3. Exit the source program (source program: The program used to create a linked object or embedded object. To edit the object, you must have the source program installed on your computer.) to return to the destination file.

Top of Page Top of Page

Edit an embedded object in the source program

  1. Double-click the embedded object (embedded object: Information (object) contained in a source file and inserted into a destination file. Once embedded, the object becomes part of the destination file. Changes you make to the embedded object are reflected in the destination file.) to open it.
  2. Make the changes that you want to the object.
  3. If you are editing the object in place within the open program, click anywhere outside of the object to return to the destination file (destination file: The file that a linked or embedded object is inserted into. The source file contains the information that is used to create the object. When you change information in a destination file, the information is not updated in the source file.).

If you edit the embedded object in the source program in a separate window, exit the source program to return to the destination file.

 Note    Double-clicking certain embedded objects, such as video and sound clips, plays the object instead of opening a program. To edit one of these embedded objects, right-click the icon or object, point to object type Object (for example, Media Clip Object), and then click Edit.

Top of Page Top of Page

Edit an embedded object in a program other than the source program

  1. Select the embedded object (embedded object: Information (object) contained in a source file and inserted into a destination file. Once embedded, the object becomes part of the destination file. Changes you make to the embedded object are reflected in the destination file.) that you want to edit.
  2. Right-click the icon or object, point to object type Object (for example, Document Object), and then click Convert.
  3. Do one of the following:
    • To convert the embedded object to the type that you specify in the list, click Convert to.
    • To open the embedded object as the type that you specify in the list without changing the embedded object type, click Activate.

Top of Page Top of Page

Select an OLE object by using the keyboard

  1. Press CTRL+G to display the Go To dialog box.
  2. Click Special, select Objects, and then click OK.
  3. Press TAB until the object that you want is selected.
  4. Press SHIFT+F10.
  5. Point to Object or Chart Object, and then click Edit.

Top of Page Top of Page

Issue: When I double-click a linked or embedded object, a "cannot edit" message appears

This message appears when the source file (source file: The file that contains information that was used to create a linked or embedded object. When you update the information in the source file, you can also update the linked object in the destination file.) or source program (source program: The program used to create a linked object or embedded object. To edit the object, you must have the source program installed on your computer.) can't be opened.

Make sure that the source program is available     If the source program is not installed on your computer, convert the object to the file format of a program that you do have installed.

Ensure that memory is adequate     Make sure that you have enough memory to run the source program. Close other programs to free up memory, if necessary.

Close all dialog boxes     If the source program is running, make sure that it doesn't have any open dialog boxes. Switch to the source program, and close any open dialog boxes.

Close the source file     If the source file is a linked object, make sure that another user doesn't have it open.

Ensure that the source file name has not changed     If the source file that you want to edit is a linked object, make sure that it has the same name as it did when you created the link and that it has not been moved. Select the linked object, and then click the Edit Links command in the Connections group on the Data tab to see the name of the source file. If the source file has been renamed or moved, use the Change Source button in the Edit Links dialog box to locate the source file and reconnect the link.

Top of Page Top of Page

 
 
Applies to:
Excel 2007