[Solved] Using Fields to Repeat Text

Writing a book, Automating Document Production - Discuss your special needs here
Post Reply
liquidcool123
Posts: 35
Joined: Sun Nov 28, 2010 8:07 pm

[Solved] Using Fields to Repeat Text

Post by liquidcool123 »

I'm looking for a way to create an exact copy of a portion of a document - formatting and text. I've tried using a bookmark, but the formatting gets lost and I have trouble if the text spans multiple lines.

Here's what I'm trying to do: I have a small form (think formatted text requiring multiple lines) and I would like to print several identical forms on the same page. I would like to update one instance of the form and have all other instances update automatically.

I have been able to do this in MS Word using the "ref" field - similar to OOO's bookmark. This is the only thing that I can do with Word, but can't do with OO. Please help!
Last edited by liquidcool123 on Sun Oct 16, 2011 10:11 pm, edited 2 times in total.
Using 3.2 on OSX 10.5 and 3.3 on Windows 7
User avatar
RGB
Posts: 1456
Joined: Mon Oct 08, 2007 1:34 am

Re: Using Fields to Repeat Text

Post by RGB »

For text that expands some paragraphs:
  1. Select the text you want to repeat
  2. Go to Insert → Sections and create a section containing the text
  3. Open the Navigator (F5)
  4. On the drop down menu to the right of the page number field ("Drag mode"), select "Insert as link"
  5. Select the section from the list of elements on the Navigator and drag-n-drop it to the desired place on the real document
  6. You are done :)
NOTE: probably the linked section will not update by itself when you introduce a change on the original text, you will need to go to Tools → Update → Update All.
There are two types of people: those who believe that there are two types of people and those who do not.

openSUSE Leap with KDE Plasma / LibreOffice
liquidcool123
Posts: 35
Joined: Sun Nov 28, 2010 8:07 pm

Re: Using Fields to Repeat Text

Post by liquidcool123 »

That is a very elegant solution and gets me closer to my goal: I can repeat multiple lines of formatted text, but I cannot get it to update AT ALL. I followed your directions to Update All, but nothing changes. If I drag the section in a 2nd time, I get the updated version, but I would like the updates to happen automatically.

I tried inserting the section as a hyperlink and a copy - still no luck with the updates. Any other advice?
Using 3.2 on OSX 10.5 and 3.3 on Windows 7
User avatar
floris v
Volunteer
Posts: 4600
Joined: Wed Nov 28, 2007 1:21 pm
Location: Netherlands

Re: Using Fields to Repeat Text

Post by floris v »

LibreOffice 24.2.7.2 on Ubuntu Linux
If your problem has been solved or your question has been answered, please edit the first post in this thread and add [Solved] to the title bar.
Nederlandstalig forum
User avatar
RoryOF
Moderator
Posts: 35140
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Using Fields to Repeat Text

Post by RoryOF »

Make your master file, containing one copy of the form, then make another file (for printing) which contains multiple links to the master file. Edit only the master file. (Note: I'm not using "master" here in the sense of an OpenOffice Master document).
Apache OpenOffice 4.1.16 on Xubuntu 24.04.3 LTS
User avatar
floris v
Volunteer
Posts: 4600
Joined: Wed Nov 28, 2007 1:21 pm
Location: Netherlands

Re: Using Fields to Repeat Text

Post by floris v »

RoryOF wrote:Make your master file, containing one copy of the form, then make another file (for printing) which contains multiple links to the master file. Edit only the master file. (Note: I'm not using "master" here in the sense of an OpenOffice Master document).
Nice one, but four DDE links work just as well.
LibreOffice 24.2.7.2 on Ubuntu Linux
If your problem has been solved or your question has been answered, please edit the first post in this thread and add [Solved] to the title bar.
Nederlandstalig forum
User avatar
RGB
Posts: 1456
Joined: Mon Oct 08, 2007 1:34 am

Re: Using Fields to Repeat Text

Post by RGB »

liquidcool123 wrote:That is a very elegant solution and gets me closer to my goal: I can repeat multiple lines of formatted text, but I cannot get it to update AT ALL.
Strange... here the linked section updates without problems (OOo 3.3, 64 bits on Linux). Can you upgrade to 3.3? On your signature I see you still use 3.2.
There are two types of people: those who believe that there are two types of people and those who do not.

openSUSE Leap with KDE Plasma / LibreOffice
liquidcool123
Posts: 35
Joined: Sun Nov 28, 2010 8:07 pm

Re: Using Fields to Repeat Text

Post by liquidcool123 »

I'm going to mark this solved. Everyone on this forum is so helpful! The solution that worked best for me was to use DDE. All I have to do is create the text that I want repeated. Then I copy it. I go to the place in the document I want the text repeated and I select "paste special" and choose as "DDE link."
When I update the original text, each of my pasted DDE links update automatically. Amazing!

I tried updating to 3.3, but I'm still using a Mac PPC and it looks like 3.2.1 is the best I can do for now. When I searched, I found DDE was from one document to another - I never knew you could link within the same document.

Two minor questions remain: Is there a character or marking that indicates the start and end of my original text? How do you get rid of the extra paragraph after each DDE link?
These are really minor issues that I can work around. Thank you for helping me say goodbye to MS Word once and for all!
Using 3.2 on OSX 10.5 and 3.3 on Windows 7
User avatar
Hagar Delest
Moderator
Posts: 33533
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: [Solved] Using Fields to Repeat Text

Post by Hagar Delest »

You can activate the view of sections boundaries (Tools>Options>OOo>Appearance).

To hide the following paragraph, set the character to hidden. To make it displayed, activate the view of non printing characters.
LibreOffice 25.2 on Linux Mint Debian Edition (LMDE 7 Gigi) and 24.8 portable on Windows 11.
User avatar
RoryOF
Moderator
Posts: 35140
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Using Fields to Repeat Text

Post by RoryOF »

liquidcool123 wrote: Two minor questions remain: Is there a character or marking that indicates the start and end of my original text? How do you get rid of the extra paragraph after each DDE link?
Delimiting the original text was why I suggested putting it in its own file. Usually if one has an obstinate paragraph which won't remove, a work around is to shrink it to something trivial, such as one point high.
Apache OpenOffice 4.1.16 on Xubuntu 24.04.3 LTS
liquidcool123
Posts: 35
Joined: Sun Nov 28, 2010 8:07 pm

Re: [Solved] Using Fields to Repeat Text

Post by liquidcool123 »

Well, I just tried this and it turns out the DDE option won't work for me. I need to be able to modify my document both at work and at home. The file path for the DDE link is different at work and home, so I can't get it to update. Is there any way to make the link independent of where the document is saved?
Using 3.2 on OSX 10.5 and 3.3 on Windows 7
User avatar
Hagar Delest
Moderator
Posts: 33533
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: [Solved] Using Fields to Repeat Text

Post by Hagar Delest »

The first advice about section linked is the best IMHO. You should try to fix the update issue. If you close the file and reopen, does it update correctly?
LibreOffice 25.2 on Linux Mint Debian Edition (LMDE 7 Gigi) and 24.8 portable on Windows 11.
liquidcool123
Posts: 35
Joined: Sun Nov 28, 2010 8:07 pm

Re: Using Fields to Repeat Text

Post by liquidcool123 »

RGB wrote:For text that expands some paragraphs:
  1. Select the text you want to repeat
  2. Go to Insert → Sections and create a section containing the text
  3. Open the Navigator (F5)
  4. On the drop down menu to the right of the page number field ("Drag mode"), select "Insert as link"
  5. Select the section from the list of elements on the Navigator and drag-n-drop it to the desired place on the real document
  6. You are done :)
NOTE: probably the linked section will not update by itself when you introduce a change on the original text, you will need to go to Tools → Update → Update All.
RGB, at work I have OO 3.3 and the links update. I usually only print at work, so I think using the sections will work for me...
Using 3.2 on OSX 10.5 and 3.3 on Windows 7
Post Reply