Writer - Copy text with the same formatting/style

Is it possible to copy and paste text with specific formatting or style? Suppose I have within my book a series of quotes which are all in italics bold (or green font colour), and I want to select them all to copy and paste them at the end of the document or to another document. I do not need to replace formatting or style, just be able to SELECT the text formatted with specific attributes (like bold+italc, or similar) in order to then COPY it in one go and PASTE it elsewhere. I cannot find a way to do this.

The same goes with styles. Suppose I need to copy all the text with the “Example” style (character style) or “Heading 5” style (paragraph style): unfortunately, it seems to be impossible. It is straightforward in other word-processors, so it may be possible to implement it in LO too?

Typical scenario: a foreign language document where I have highlighted key-words and key-phrases within the text itself for my students, by marking them all BOLD+GREEN. In order to check the learning of these items, I then want to produce another document with all the BOLD+GREEN portions blanked out, and a list of the missing words/expressions at the bottom. I need there fore to SELECT all the highlighted portions, COPY and PASTE them at the bottom (ideally separated by a space or Carriage Return), and then blank them, by changing the font colour to white for instance.

Version: 6.1.3.2 (x64)
Build ID: 86daf60bf00efa86ad547e59e09d6bb77c699acb
CPU threads: 8; OS: Windows 10.0; UI render: GL;
Locale: en-GB (en_GB); Calc: CL

Thank you for any help, Gabriele

Pasting works for me out-of-the-box. Which LO version and OS?

If your question is about selecting a sequence of text with specific formatting, clarify your question. Edit>Find & Replace has an advanced option to find paragraph styles. It does not work with direct formatting or character style.

Please provide this extra information through the edit link, not with an answer.

LibO F&R (tested with V6.1.4) can find hard formatting to some extent. Specific colors (as set under Font Effects) may be problemetic, but attributes like Italic or Bold should not.

Thank you ajlittoz and Lupp. I have further clarified the problem in my original post. I am not trying to replace anything, just select, copy and paste portions of text with the same formatting. Thank you for your help.

Using Edit>Find & Replace various options, you define which portions of text will match. Push Find All button to select the portions. You can then close the dialog, the portions remain selected.

Copy the portions with Ctrl+C. You can then paste them anywhere.

Be aware that the selection does not include the paragraph marks or the “separation” between non contiguous areas. This means that all pieces of the selection are concatenated in a single block when you paste.

There is probably a better solution if you explain what you try to achieve (again edit your question, don’t answer). For instance, the reason for copying and pasting all Heading n paragraphs is to create a TOC. There is a built-in mechanism for that. Similarly, quotations are usually highlighted in some way (to make them clearly different from surrounding text) and frequently collected in an index-like area. Once again, there is a mechanism to mark them so that they are automatically collected in an index, avoiding the manual task in a very reliable way with automatic update.

EDIT

The highlighted words and sentences point of the scenario is solved with a character style which you modify before printing (if you hand over the document electronically, the students will quickly learn the style trick!).

In YOUR copy, you set the font colour to black; in the STUDENT copy, the font color is set the same as the background or the highlight colour if present.

The list of words can be also created automatically through the use of indexes.

If your document is short (one page only) or contains a single exercise, go ahead with a standard index: select the words and Insert>TOC & Indexes>Index Entry. At the location where you want the list, Insert>TOC & Indexes>TOC & Indexes. You’ll have to change the Entries tab to remove page number, tabs and leading. Also paragraph style Index 1 which controls the layout of level-1 index entries will have to be adapted to your needs.

If your document is made of several exercises on independent pages and you want the list per exercise/page, give the title of every exercise paragraph style Header 1 (adapt its properties to your needs) so that each exercise is considered by LO Writer as a chapter. Now you can create a “chapter-only” index at the end of each exercise. It will contain only words highlighted in this chapter and none from the others.

Experiment and enjoy.

To show the community your question has been answered, click the ✓ next to the correct answer, and “upvote” by clicking on the ^ arrow of any helpful answers. These are the mechanisms for communicating the quality of the Q&A on this site. Thanks!

Thank you, ajlittoz. I am aware of these other options. Just wondering whether a function similar to MS Word’s “Select all text with similar formatting” was available…

Thanks for the detailed answer. I have tried it and am sorry to say I am sticking to Word, though, on this topic, much more versatile and SIMPLER! Perhaps future versions of LO Writer will add the function…