Repeated lines in word

Investigator Davis


  • #1

When typing my reports I need to constantly repeat lines of text such as:
«Area video was obtained; however, no change in subject activity» and
«investigator departed the area, mobile surveillance was continued»……

I can’t copy and paste since there will be more than one line of text that
I’ll need. When I come to the point in my report where I need to enter one of
the lines shown above, is there a Ctrl+ option that I can set up to where,
say for example a Ctrl+X would enter one line of text, then a Ctrl+Y will
enter a different line of text? They are never in the same spot in the
report, as each report consists of different clients and acitvities. My
report writing time would be cut in half if I had a way to easily enter these
repeated lines of text.

Thank you so much for your help!
K Davis

Advertisements

Jay Freedman


  • #2

Each item that may be repeated should be assigned to either a Quick
Part or an AutoCorrect entry.

To assign a Quick Part, select the text and press Alt+F3. In the small
dialog that appears, assign a name and (optionally) a gallery and
category. You can also say which template you want it stored in. To
pull a copy of it into the text, type the name (or at least enough of
it to uniquely identify it) and press F3. The number of Quick Parts
you can create is effectively unlimited.

To assign an AutoCorrect entry, select the text and go to Office
button > Word Options > Proofing > AutoCorrect Options. The text will
appear in the box at right center of the dialog. (If you want it to be
formatted as it is in the selected text, click the Formatted Text
option; otherwise it will be plain text formatted like the
destination.) To its left, enter a unique name or abbreviation and
click the Add button. To pull a copy of it into the text, type the
name followed by a space or any punctuation, and it will instantly be
replaced by the full entry.

Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.

On Sat, 20 Jun 2009 09:07:02 -0700, Investigator Davis <Investigator

Investigator Davis


  • #3

I can’t thank you enough! I used the AutoCorrect option and it worked
perfectly. Your prompt reply is greatly appreciated, as is your expertise.
The directions were simple to follow and the result was the answer I was
looking for. Thank you Jay, I know just who to ask next time I need solutions!

Advertisements

Peter T. Daniels


  • #4

Why did you assume (correctly, as it happens) that he was using 2007?

Quickly paste text from a file into the form below to remove all duplicate lines from your text.

This tool will compare all the lines in your text and then find and remove all of the identical lines. You can then paste the newly cleaned unique text lines back into a file for saving.

I’ve also added an option for you to alphabetize the lines after all the duplicate lines have been removed. You can also automatically sort the remaining lines in reverse order if you need to.

Note: Although the form below may seem small, you can paste tons of text into it to get your duplicate lines automatically removed. No problem.

More Free Tools to Check Out!

  • Paragraph to Single Line Converter
  • Generate Random Words for Brainstorming
  • Alphabetize Text Automatically
  • Convert Word Doc Content to HTML Code
  • Title Capitalization Tool
  • Title and Description Letter Counter

Language Versions

Remove Duplicate Lines Online is also available in German (Doppelte Zeilen entfernen),
French (Supprimer les lignes dupliquées)
and Spanish (Eliminar líneas duplicadas).

Most Popular Text Tools

Alphabetical Tools

Random Generators

Line Break Tools

Fun Text Tools

Text Changing Tools

SEO and Word Tools

Content Conversion Tools

HTML Code Generators

HTML Compression

HTML Encoding Tools

I’ve got a table in an MS Word 2007 document in which the first two lines (not the heading line) are duplicated closer to the end, for an unknown reason.
I cannot select them using the mouse. O_O

What can I do to delete them?

I added a comment to the author by selecting one of the lines and adding a comment (because the «original» line can be selected and edited). Strangely, the comment duplicated closer to the end, where this line duplicates.

I’m translating this document and it’s the author’s business really to deal this bugs of this sort, but I’m curious.

P.S. I selected the whole table and copied it into another document, and voila, the repeating lines vanished. The repearing lines were just under where the table crossed a border between two pages.

P.P.S. However, when I return the «healthy» table into the original document, the two duplicate lines just below the page border appear again.

A frequent reader question involves repeating text in a Word document. For example, Yassen wants to populate a combo box content control with three items. When users select an item from the control’s dropdown list, Word should repeat the selected value throughout the document.

Spend any time researching repeated content, and you’ll probably come across some difficult solutions, from mapped XML elements to bookmarked controls and form fields. If you’re an ordinary user without advanced skills, you’re out of luck. Fortunately, there are two ways to display repetitive data that don’t require any expert skills.

I’m using Word 2016 (desktop) on a Windows 10 64-bit system, but both techniques will work in older versions. The browser edition doesn’t support content controls. You can’t insert fields in the browser edition, but it will support them, to a degree. You won’t see the field’s results on screen, but Word will print them. There’s no downloadable demonstration file, because you won’t need one.

SEE: 50 time-saving tips to speed your work in Microsoft Office (free TechRepublic PDF)

The example content control

We’ll look at two methods to achieve Yassen’s goal, using the same example combo box content control in both:

  1. Position the cursor where you want to insert the content control and click the Developer tab. If this tab isn’t available, and you don’t know how to add it to the Ribbon, read Two easy ways to customize the Ribbon interface.
  2. In the Controls group, click the Combo Box Content Control to insert the control.
  3. Click Properties in the Controls group.
  4. Enter a meaningful title (name) for the control in the Content Control Properties dialog.

Now, you need to create the items that will populate the control’s dropdown list:

  1. Click Add.
  2. In the resulting dialog, enter the first item, Public. Then, enter the value 1 (Figure A) and click OK.
  3. Repeat those steps to add two more items: Internal, 2 and Confidential, 3. Figure B shows all three items.

Figure A

Add an item to the dropdown list.

Figure B

This dropdown will have three items.

Figure C shows the control with its populated dropdown list. In this example, we won’t use the values you used to define each item for the dropdown list, but we entered them in case you want to further customize yours. (The values are accessible via VBA.)

Figure C

Word populates the control’s dropdown list with the three items you added.

SEE: 20 pro tips to make Windows 10 work the way you want (free TechRepublic PDF)

A copy and paste method

Now you need to paste the control into the areas where you want the selected confidentiality level to repeat. This is the tricky part because if you don’t select the control properly, Word won’t let you paste it as a link, and that’s what you need–a link.

To select the control, double-click it. If it’s aligned with the left margin, you can also click to the left in the margin. Press Ctrl+C to copy the control to the Clipboard. Position the cursor where you want to repeat the control’s selected value. Don’t press Ctrl+V as you normally would to paste something. Instead, choose Paste Special from the Paste dropdown in the Clipboard group on the Home tab (Figure D).

Figure D

Choose Paste Special; don’t use Ctrl+V.

In the resulting dialog, select the Paste Link command to the left, select the Unformatted Text option in the As list, as shown in Figure E, and then click OK. If the Paste Link option is disabled, exit out of the dialog, reselect the control, copy it, and try again.

Figure E

Paste the control as an unformatted link.

Yassen wants the repeated text in the document’s footer, which Word supports. Simply open the footer and paste the control. Figure F shows the copied control in the body of the document a few lines below the original and in the document’s footer.

Figure F

This document will repeat the selected value in the original control in the body of the document and in the footer.

The only thing left to do is to choose an item from the original control’s dropdown list and watch the other two controls update automatically. If you’re still in edit mode for the footer, exit out. Next, click the Confidentiality Levels dropdown and select Public (or any other item). Both copied controls update immediately–even the one in the footer, as shown in Figure G.

Figure G

The copied controls repeat the selected value.

When you open the file, Word will prompt you about the link. Click Yes; if you click No, your copied controls won’t update if you change the selected value in the original control.

You don’t need specialized development skills or even power-user confidence to make this work. If you can copy and paste, your document can support repetitive data.

Use StyleRef

StyleRef is a reference field that automatically displays specifically styled text. In this example, we won’t copy and paste the control as we did before. Instead, we’ll apply a style and then insert a StyleRef field where we want to repeat the text. Unfortunately, this field looks for and displays the closest text formatted using the specified style–so it’s not quite as powerful as the linked solution.

First, apply a style to the original example control. Choose one that’s not currently in use; you must use a unique style. You can modify the style to meet your formatting needs or create a new style. In this example, we’ll use the built-in Subtitle style. Simply select the control and click Subtitle in the Styles gallery (Figure H).

Figure H

Apply a style to the control.

Now you’re ready to insert the fields as follows:

  1. Position the cursor where you want the text to repeat.
  2. Click the Insert tab.
  3. Choose Field from the Quick Parts dropdown in the Text group.
  4. In the resulting dialog, choose StyleRef from the Fields Name list.
  5. From the Style Name list, select Subtitle (Figure I).
  6. Click OK to insert the field.

Figure I

Choose the same style you applied to the control.

As you can see in Figure J, I added two StyleRef fields: one below the original control and one in the header. Unfortunately, this field looks for and displays the closest text formatted using the specified style (from the top of the page), so it’s not quite as powerful as the linked solution. However, you can change the default and force Word to search from the bottom of the page.

Figure J

StyleRef works with only one field.

Send me your question about Office

I answer readers’ questions when I can, but there’s no guarantee. Don’t send files unless requested; initial requests for help that arrive with attached files will be deleted unread. You can send screenshots of your data to help clarify your question. When contacting me, be as specific as possible. For example, “Please troubleshoot my workbook and fix what’s wrong” probably won’t get a response, but “Can you tell me why this formula isn’t returning the expected results?” might. Please mention the app and version that you’re using. I’m not reimbursed by TechRepublic for my time or expertise when helping readers, nor do I ask for a fee from readers I help. You can contact me at susansalesharkins@gmail.com.

Also read…

  • Microsoft Certified Engineer 27-Course Super Bundle: Lifetime Access (TechRepublic Academy)
  • Microsoft adds more business apps to Office 365 Business Premium subscriptions (ZDNet)
  • Five ways to take advantage of Excel list features (TechRepublic)
  • Office Q&A: A conditional formatting rule with multiple conditions (TechRepublic)

Scenario

You have some text in a Word document that you’d like to repeat later in that document. You don’t want to write it twice (or more), and you’d rather not copy/paste it from the other location as that means that you’ll have to remember to maintain it in both places if there are changes. If another author takes over the document, they may not know that they have to update this text in two or more places if there are changes, either.

Of course, it would be nice if you could use a tool designed to deal with this sort of single sourcing (such as Author-it), but you’re stuck with Word.

Solution

Bookmarks!

You assign a bookmark to the text you want to re-use, then insert a cross-reference to the bookmark text. Whenever you change the original text, you only need to update the fields in the document for the changes to apply to the second (or third) instance of that text.

Here’s how:

  1. Select the block of text you want to repeat later in the document. This text can be a phrase, one or more paragraphs, a bulleted list, a table, etc.
  2. Insert a bookmark for the selected text (Word 2007 and later: Insert tab > Bookmark).
  3. Give the bookmark a meaningful name, click Add, then click OK.
  4. Go to the place in the document where you want to re-use the selected text.
  5. Insert a cross-reference (Word 2007 and later: References tab > Cross-reference).
  6. Select Bookmark as the Reference Type, and Bookmark Text as the Insert option.
  7. Select the bookmark name you added in Step 3, then click Insert.
  8. Whenever you change any text in the original list, just click inside the other list, then press F9 to update it (or Ctrl+A then F9 to update ALL fields in the document).

Optional

In some situations, you might want to repeat a block of text in a document, but when the document’s finished, you might want to break the link between the two.

For example, a colleague had a PPE (personal protective equipment) list near the beginning of her document that she needed to repeat in the main procedure table. Once all the reviews were completed and the document signed off, the procedure table was to be split from the main document into a new document of its own. So she needed to break the link between the original PPE list and the one in the procedure.

To break the link:

  1. Select the field that contains the re-used text.
  2. Press Ctrl+Shift+F9.

[Links last checked January 2011]

Понравилась статья? Поделить с друзьями:
  • Remove duplicate column in excel
  • Relating to humans word
  • Repeat the verse word for word
  • Relating to computers word
  • Remove characters from text in excel