Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index

Hi Joseph,

On 05/04/11 17:38, Joseph Nierenberg wrote:

Unfortunately, the solution does not seem to work.

Hm. I tried it again, and it's working for me! I'll write below exactly what I did to test it. First though...

I played around with inserting sections, both as links and as links/DDE, but that didn't seem to work, either.

Yea, I couldn't get that one to work. Specifically, the conditions in the source document don't get applied automatically to the target document. So let's stay with conditional fields rather than sections.

Source document = where the text I want to include resides
Target document = where I want the included text to appear

When I copied the text of the source document and special pasted it into the target document, doing so as a LO Writer object inserted the whole text. But doing so as a DDE object, which is what you suggested, does... nothing. Nothing appears in editing mode, nor in page preview mode. (I didn't look at the XML, because if the functionality isn't there, I don't really care what's under the hood.) Special pasting the DDE link onto an existing piece of text in the target document deletes the pre-existing text but replaces it with nothing.

Here's what I just did to test:

1. Ctrl-n to create a new document in Writer.
2. Ctrl-F2 for Insert Fields, tab over to the Functions tab, going for a Conditional Text. 3. Say my username (hence the name to which Writer attributes documents by default) is "Ryan". To test, first put in an erroneous username:
    Condition: user_firstname == "alf"
    Then: Hi Ryan!
    Else: You're not Ryan.
4. Insert, Close.

For me, this now shows: You're not Ryan.

5. Put cursor to start of the field, then Alt-E, i for Edit > Fields...
6. In the Condition input box, change "alf" to "Ryan", hit Enter

Text in the document now shows: Hi Ryan!

7. Save document as "doc1.odt".
8. Ctrl-n for new document.
9. Save it as "doc2.odt".
10. Go back to doc1, select all, Copy.
11. Go back to doc2, Ctrl-Shift-v to bring up the Paste Special dialogue box. "DDE Link" is the last option, select it and hit enter.

doc2 now says this too: Hi Ryan!

12. Save and close doc2.
13. In doc1, edit our field again so that the Then text field reads simply: Salutations! 14. Hit Enter to get out of the Edit Fields: Functions dialogue and apply the change to the document.

doc1 should now just say: Salutations!

15. Save and close doc1.
16. Open doc2. Presented with a dialogue that says: "This document contains one or more links to external data. Would you like to change the document, and update all linsk to get the most recent data? [ Yes ] [ No ]". Choose Yes.

doc2 now says: Salutations!

So, that's all I have to go on. I'd be happy to look at some minimal non-working examples if you want to send them off-list.

(Even if it worked, it would be a little kludgy, because a user would have to first go to the source document to copy. If the target is a template, that wouldn't be too difficult, but it's not the same as browsing and clicking.)

I am in complete agreement with you there.

All the best,



On 1:59 PM, Ryan Jendoubi wrote:
Hi Joe,

On 28/03/11 19:39, Joe Nierenberg wrote:
I would like to include text from a closed file into the open file.
However, rather than have all of the text there, reproduced in the
open file, I want only the field name. (The reason is that it is
conditional text, that might not always be included.) According to my
searches, there is no LO Writer equivalent to MS Word's INCLUDETEXT
field; there is only the menu command to insert a file, which gives
the entire text. Ideas?

I /might/ have found an answer for this. The answer came from finding
out what DDE actually stands for. From the Writer help:


DDE stands for "Dynamic Data Exchange," which is a predecessor of OLE,
"Object Linking and Embedding". With DDE, objects are linked through
file reference, but not embedded.

You can create a DDE link using the following procedure: Select cells
from a Calc spreadsheet, copy them into the clipboard and switch to
another spreadsheet and select the *Edit - Paste Special* dialogue box.
Select *the Link* option to insert the contents as a DDE link. When
activating a link, the inserted cell area will be read from its original

I did this, copying a footnote field from one document and
paste-special-ing it into another (Ctrl-Shift-v). While editing, the
pasted field seems to contain only the text "DDE field" but a print
preview shows that it contains the proper value.

In order to get the fields to update you have to go Tools > Update >
Links rather than Tools > Update > Fields, so F9 doesn't do it (under
the default config). Also, links sometimes appear to become disconnected
(right-click > Fields...: 'Status' column for link no longer says
'Automatic'). I haven't been able to work out when / why exactly this

I haven't tried this with conditional fields. I would be very interested
to know if this solves your problem.



Unsubscribe instructions: E-mail to
Posting guidelines + more:
List archive:
All messages sent to this list will be publicly archived and cannot be deleted


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.