INCLUDETEXT

classic Classic list List threaded Threaded
6 messages Options
Joe Nierenberg Joe Nierenberg
Reply | Threaded
Open this post in threaded view
|

INCLUDETEXT

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?

--
Unsubscribe instructions: E-mail to [hidden email]
List archive: http://listarchives.libreoffice.org/www/users/
*** All posts to this list are publicly archived for eternity ***

doubi doubi
Reply | Threaded
Open this post in threaded view
|

Re: INCLUDETEXT

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

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
file."


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
happens.

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

Cheers,

-r

--
Unsubscribe instructions: E-mail to [hidden email]
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/www/users/
All messages sent to this list will be publicly archived and cannot be deleted

John Davies John Davies
Reply | Threaded
Open this post in threaded view
|

Re: INCLUDETEXT

The more I reply as instructed to unsubscribe the more I get. Can you help get
my email OFF the damned list?




________________________________
From: Ryan Jendoubi <[hidden email]>
To: [hidden email]
Sent: Mon, April 4, 2011 2:44:13 PM
Subject: Re: [libreoffice-users] INCLUDETEXT

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

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 file."


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 happens.

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

Cheers,

-r

-- Unsubscribe instructions: E-mail to [hidden email]
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/www/users/
All messages sent to this list will be publicly archived and cannot be deleted
--
Unsubscribe instructions: E-mail to [hidden email]
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/www/users/
All messages sent to this list will be publicly archived and cannot be deleted

Joseph Nierenberg Joseph Nierenberg
Reply | Threaded
Open this post in threaded view
|

Re: Re: [libreoffice-users] INCLUDETEXT

In reply to this post by doubi
Ryan,

First of all, thanks for persisting with this.

Unfortunately, the solution does not seem to work.

(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.)

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.

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

Joe


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
>
> 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
> file."
>
>
> 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
> happens.
>
> I haven't tried this with conditional fields. I would be very interested
> to know if this solves your problem.
>
> Cheers,
>
> -r
>




--

Joe Nierenberg


     Nierenberg Employment Law, P.L.L.C.
     Consulting – Litigating – Training
     Tel. 952-826-6494
     www.nierenberg.com

--
Unsubscribe instructions: E-mail to [hidden email]
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/www/users/
All messages sent to this list will be publicly archived and cannot be deleted
TomW TomW
Reply | Threaded
Open this post in threaded view
|

Re: INCLUDETEXT

In reply to this post by Joe Nierenberg
On 2011-03-28 14: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?
>

Joe:

Did you explore the options in 'Insert|Fields|Other'?  I am not familiar
with the Word feature you are looking for, but this menu section offered
some other options.

TomW

--
Unsubscribe instructions: E-mail to [hidden email]
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/www/users/
All messages sent to this list will be publicly archived and cannot be deleted

doubi doubi
Reply | Threaded
Open this post in threaded view
|

Re: INCLUDETEXT

In reply to this post by Joseph Nierenberg
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,

-r



> Joe
>
>
> 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
>>
>> 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
>> file."
>>
>>
>> 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
>> happens.
>>
>> I haven't tried this with conditional fields. I would be very interested
>> to know if this solves your problem.
>>
>> Cheers,
>>
>> -r
>>
>
>
>
>


--
Unsubscribe instructions: E-mail to [hidden email]
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/www/users/
All messages sent to this list will be publicly archived and cannot be deleted