In Microsoft Word, this is very easy. You just need to open “Find and Replace”, enable Wildcards and replace ^13 (paragraph break) with ^l (line break).
But this is a little different in LibreOffice Writer. But you do not require any macro for this. Just follow this process.
- First of all, type a line break by pressing “Shift” + “Enter”
- Now copy this line break
- Now open “Find and Replace” (You can use the shortcut “ctrl” + “H” to open “Find and Replace” dialogue box)
- Click on checkbox for Regular Expressions
- Type “$” in the find box to search for paragraph break
- Click on “Find All”. This will cause all the paragraph breaks in the document to get selected
- Close the “Find and Replace” box without removing the selection
- Press “ctrl” + “V” and it will paste line break in place of all the paragraph breaks