[Tutorial] About DDE and OLE objects

Forum rules
No question in this section please
For any question related to a topic, create a new thread in the relevant section.
Post Reply
User avatar
foxcole
Volunteer
Posts: 1507
Joined: Mon Oct 08, 2007 1:31 am
Location: Minneapolis, Minnesota

[Tutorial] About DDE and OLE objects

Post by foxcole »

Many new users link objects such as spreadsheets into Writer documents but aren't sure about the right way to get what they want. This tutorial explains the difference between OLE and DDE links.

About OLE

OLE (Object Linking and Embedding) is designed to link to files created by other applications and allow you to edit the object using its native program (such as Calc), without leaving the host program (such as Writer). The word "link" in this case really just means a one-time pointer to the file address. Read on to see what I mean by that.

To insert an OLE object:
  • In the menu bar, choose Insert> Object> OLE object.

    This opens a dialog in which you can either choose to create a new blank object (that's the default) or create the object from an existing file. The "new" list shows only OOo modules, but there is an item at the bottom of the list, "Further objects." This expands the list to show all the kinds of OLE objects that OOo can use.

    If you're creating an OLE object from an existing file, please understand that this inserts a copy of the original. It is in no way linked to the existing file.
After you insert the object, you can double-click to edit it in its native program without leaving the Writer window. Again, this is a copy, so you are not editing the original file nor creating a new separate file.

Caveat: PDF is one of the file formats available in the OLE list. However, if you do not have a PDF editor such as Acrobat or FoxIt Editor installed on your computer, you will receive an error message and will not be able to insert the PDF as an OLE object. The whole point of OLE is to be able to edit the file. Having a PDF viewer such as Adobe Reader is not sufficient for this type of object.

Along the same lines, if you successfully insert an OLE object but then send the file to someone who does not have an editor for that object's file type, they won't be able to see the object and will receive an error message when they open the file.

About DDE

DDE (Dynamic Data Exchange) creates an active---in other words, dynamic---link to the object. The content in Writer will update when the original file is updated.

To create a DDE link to a Calc spreadsheet:
  • Open the spreadsheet.

    Select the data range that you want displayed in Writer. (If you have named data ranges, you can select it that way; or you can simply drag a selection area.)

    In the Writer document, choose Edit> Paste Special, and click DDE link in the list of available formats.
The pasted DDE content will paste as a plain-looking table. It does not carry formatting from the spreadsheet. You can use Writer's table tools or AutoFormat features (or create your own AutoFormat) to make the table appear the way you wish.

Caveat: The DDE link definition contains only the rows and columns you pasted in. The object can't automatically expand to include additional rows or columns, so if you add any in the original, you'll have to include those in a new selection to paste as DDE.
Last edited by foxcole on Mon Jan 14, 2008 3:31 am, edited 1 time in total.
Cheers!
---Fox

OOo 3.2.0 Portable, Windows 7 Home Premium 64-bit
User avatar
Bhikkhu Pesala
Posts: 1253
Joined: Mon Oct 08, 2007 1:27 am

Re: [Tutorial] About DDE and OLE objects

Post by Bhikkhu Pesala »

I have heard some rumours about OLE that it is inherently unstable and outdated technology. In your experience, do many users report problems such as corrupted documents and lost data when using OLE or DDE?
Idiot Compassion
LibreOffice 6.0.4 on Windows 10
User avatar
foxcole
Volunteer
Posts: 1507
Joined: Mon Oct 08, 2007 1:31 am
Location: Minneapolis, Minnesota

Re: [Tutorial] About DDE and OLE objects

Post by foxcole »

Bhikkhu Pesala wrote:I have heard some rumours about OLE that it is inherently unstable and outdated technology. In your experience, do many users report problems such as corrupted documents and lost data when using OLE or DDE?
The OLE technology is of very limited use and I'd like to see it graduate to the next level. It's a Microsoft-developed technology that hasn't changed much since it was first developed and its sole purpose, as noted above, is just to be able to edit a file in another application.

The main problem along the lines of corruption or loss of data, in my experience, comes from cases where the OLE object can't be used because someone received a document containing an OLE object but has no suitable editing application installed. This can cause a document to fail to open, or give errors upon opening, or make the object appear as garbage characters.

By far the most frequent problem is that people expect an OLE object to update when they update the original document, expecting the OLE to be a "live" link to the original, so when that doesn't happen they believe something's wrong with the link or with OOo.

The main problem I've seen so far with DDE links has to do with special characters, but it's unclear whether that's an OS issue or an application issue. My bet is with the former.
Cheers!
---Fox

OOo 3.2.0 Portable, Windows 7 Home Premium 64-bit
Post Reply