OLE with MS Office
Object Linking and Embedding
MS Office is a suite of
software
The applications can share information
among themselves
There are different ways to do it,
depending on
Whether you want the data to be „live‟ or
not
Whether you want all the data in one file
Whether you are going to move your
documents to another location
Three Methods
1. Copy and Paste
2. Embedding
3. Linking
These will be discussed in the order of
decreasing “independence” between the
source document and the target document
Copy and Paste is the most independent,
Linking is the least independent
Copy and Paste
The simplest way to share data between
applications
Have both apps open at the same time
Select and copy what you want from one
document – goes into the Clipboard
Activate other app and Paste the data in
the Clipboard where you want it in the
document using usual Paste methods
PROBLEM: data is static – if the original
data changes, this copy is NOT updated
Copy and Paste cont‟d
The paste operation turns the object
being pasted into the format of the
target document
cells in Excel become a table in Word
a table in Access becomes a table in Word
Word documents lose some formatting
when pasted into Powerpoint
Paste Special
The other two
operations require
“Paste Special”
You get that by
going to the target
application and
choosing the Paste
menu
Paste Special
When you choose
Paste Special you
get a menu of
choices of formats
to paste as
You want to choose
the Object format
Embedding
Embedding an object in a document keeps
the object in its “native format”
A spreadsheet stays a spreadsheet, does
not change to a table in Word
You can edit it with a limited form of the
original application – not Excel but a
smaller version of Excel
Copy the object, then Paste Special then
Paste then choose the “object” type
Embedding
If you double click on an embedded
object, you open up a limited form of
the application that originally created
the object
You can make changes that are
reflected in the object in the current
document – they are NOT reflected in
the original object
Advantages to embedding
Data can be manipulated in its “native
format”
The object is part of the document and
will be moved with it – it‟s not a
separate file
If moved to another machine, that
machine does not have to have the
application installed (software is
packaged with the object)
Linking an object
Linking an object to a document
establishes a link between the two
documents
The data is really stored in the original
(source) document
Changes made in the target document
are actually made to the source and
use the full power of the application
that created the object
Linking
You link by copying the object you want
in the source application, then using
Paste Special in the target application,
then say “Paste as Link”
When you double click on the object in
the target, you open the source
application and can make any changes
you want to – they will show in both
documents
Linking
When an object is linked to a
document, all that is stored in the
target is the location of the object
This saves space; there is only one copy of
the data
This can be awkward if you move the
original file – the link won‟t work
afterwards
Linking - updating
If you want the linked document, then
right-click and choose Update Link.
Be careful that you want this update to
happen! If the original has changed, it
will overwrite your copy in the target
Which to use?
If all you need is a „snapshot‟ of the
data, use Copy and Paste
If you need an object that is editable in
its original format and that is part of the
current document, use Embedding
If you want to be able to use all the
abilities of the source application, or
you are tight on space for storing the
document, use a Link
Which to use?
If you want the data NOT to be updated
when the original changes, and you can edit
the data in the target application, use copy
and paste
If you want the data NOT to be updated
when the original changes but want to edit in
“native format”, use embedding
If you want the data to always be the most
current version and have the full power of the
application available, then use linking
Another way to do Linking and
Embedding – in Office 07/10
Insert object
Create from file, browse to file
Make a choice of either Link or not with
the checkbox
Link checked = Linked
Link not checked = Embedded
Hyperlinks
not the same thing as linking
documents together
in Word or Excel or Powerpoint, go to
Insert menu and choose Hyperlink
Browse to the file you want to link to
Change the "Text to Display" to
whatever you want the label to be
Click on Ok
Difference between Hyperlinks
and Linked objects
the linked object will show the data
contained in the object in the target
document - it looks like it is actually in
the document
a hyperlink will show a label (the "Text
to Display" in previous slide) and you
have to Ctrl+click to get to see the data