How to merge or combine multiple lines into a single paragraph in Word document?
If there are hundreds and thousands of paragraphs in your Word document, when printing this document, it will need a lot of paper. For saving papers, you can merge these multiple lines into one single paragraph. However, how could you combine all these lines into one paragraph quickly and easily in Word document?
Merge or combine multiple lines into one single paragraph with Find and Replace function
Merge or combine multiple lines into one single paragraph with VBA code
Merge or combine multiple lines into one single paragraph with Find and Replace function
The Find and Replace function in Word can help you to merge multiple lines into one paragraph, please do as this:
1. Select the paragraphs that you want to merge into one paragraph.
2. And then, click Home > Find > Advanced Find to go the Find and Replace dialog box, in the Find and Replace dialog box, under the Find tab, please enter ^p into the Find what text box, and then select Current Selection option from the Find In drop down list, see screenshot:
3. Then go to the Replace tab, and leave the Replace with text box empty, and then click Replace All button, see screenshot:
4. And all the selected paragraphs have been merged into one single paragraph, see screenshot:
Merge or combine multiple lines into one single paragraph with VBA code
Here is another useful method also can help you to finish this job in Word, please do with following steps:
1. Select the lines that you want to merge into one paragraph.
2. Then, hold down the ALT + F11 keys to open the Microsoft Visual Basic for Applications window.
3. And then, click Insert > Module, copy and paste below code into the opened blank module.
VBA code: Merge multiple lines into one single paragraph:
Sub CleanUpPastedText()
Dim xSelection As Selection
On Error Resume Next
Application.ScreenUpdating = False
Set xSelection = Application.Selection
If xSelection.Type <> wdSelectionIP Then
FindAndReplace xSelection
Else
If MsgBox("Do you want to merge all selected lines into one paragraph?", vbYesNo + vbInformation, "Kutools for Word") = vbNo Then Exit Sub
xSelection.WholeStory
Set xSelection = Application.Selection
xSelection.HomeKey wdStory
FindAndReplace xSelection
End If
Application.ScreenUpdating = True
Application.ScreenRefresh
MsgBox "The selected lines have been merged into one paragraph.", vbInformation, "Kutools for Word"
End Sub
Sub FindAndReplace(Sel As Selection)
With Sel.Find
.ClearFormatting
.Replacement.ClearFormatting
.Forward = True
.Wrap = wdFindStop
.Format = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
.Text = "[^s^t]{1,}^13"
.Replacement.Text = "^p"
.Execute Replace:=wdReplaceAll
.Text = "([!^13])([^13])([!^13])"
.Replacement.Text = "\1\3"
.Execute Replace:=wdReplaceAll
.Text = "[ ]{2,}"
.Replacement.Text = " "
.Execute Replace:=wdReplaceAll
.Text = "([a-z])-[ ]{1,}([a-z])"
.Replacement.Text = "\1\2"
.Execute Replace:=wdReplaceAll
.Text = "[^13]{1,}"
.Replacement.Text = "^p"
.Execute Replace:=wdReplaceAll
End With
End Sub
4. And then press F5 key to run this code, and all selected paragraphs have been combined into one paragraph as following screenshot shown:
Recommended Word Productivity Tools
Kutools For Word - More Than 100 Advanced Features For Word, Save Your 50% Time
- Complicated and repeated operations can be done one-time processing in seconds.
- Insert multiple images across folders into Word document at once.
- Merge and combine multiple Word files across folders into one with your desired order.
- Split the current document into separate documents according to heading, section break or other criteria.
- Convert files between Doc and Docx, Docx and PDF, collection of tools for common conversions and selection, and so on...






