Skip to main content

Kutools for Office β€” One Suite. Five Tools. Get More Done.

How to merge or combine multiple lines into a single paragraph in Word document?

Author Xiaoyang Last modified

When working with text in Microsoft Word, you might encounter situations where you need to merge or combine multiple lines or paragraphs into a single paragraph. This can be useful for improving readability, formatting consistency, or even saving paper when printing large documents.

In this tutorial, we will show you various methods to efficiently merge multiple lines into a single paragraph in a Word document, helping you streamline your text for better presentation and practicality.

Merge or combine multiple lines into one single paragraph with Find and Replace function

Merge all paragraphs into a single paragraph across multiple documents using Kutools for Word

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 easily combine broken sentences into a continuous paragraph. Here's how:

  1. Select the paragraphs you want to merge, without selecting the final paragraph mark.
    Tip: Skip this step if you want to merge all paragraphs in the document.
  2. Click "Home" > "Find" > "Advanced Find" to open the "Find and Replace" dialog box.
  3. In the "Find" tab of the dialog box, enter "^p" in the "Find what" box and select "Current Selection" from the "Find In" dropdown.
    Find and Replace dialog box with ^p entered in the Find what text box and Current Selection selected from the Find In drop-down list
    Tip: Instead of typing "^p", you can also click "More >>", then select "Paragraph Mark" from the "Special" dropdown menu.
  4. Go to the "Replace" tab, type a space in the "Replace with" box, and click "Replace All".
    Find and Replace dialog box with ^p in the Find what text box and a space in the Replace with text box
  5. When prompted to search the rest of the document, click "No".
    Confirmation dialog

The selected paragraphs are now merged into a single paragraph.

The selected paragraphs are merged into one single paragraph
Office Tab: Brings tabbed interfaces to Word, Excel, PowerPoint...
Navigate through documents using Office Tab
Enhance your workflow now.      Learn More about Office Tab       Free Download

Merge all paragraphs into a single paragraph across multiple documents using Kutools for Word

Kutools for Word offers an efficient way to merge or combine all paragraphs into a single paragraph. This tool simplifies the process, enabling you to quickly consolidate all lines into one cohesive paragraph across selected documents.

Kutools for Word, equipped with AI πŸ€–, offers over 100 handy features to simplify your tasks.
  1. On the "Kutools" tab, click "Batch Replacement".
    Batch Replacement option on the Kutools tab in Word ribbon
  2. In the "Batch Find and Replace" dialog:
    1. Click "Add Row" to create a rule for merging paragraphs.
    2. In the "Find" field, type "^p". In the "Replace" field, type a space.
    3. Click the "Add" button, then choose "Add Files" or "Add Folder" to import the documents where you want to combine all lines into a paragraph.
    4. Click "Replace" to apply the changes across all the selected documents.
      Batch Find and Replace dialog with ^p in the Find field and a space in the Replace field
  3. Preview results in the "Preview Result" tab. When you're satisfied, click "Close".
    Batch Find and Replace dialog with preview results

That's it! All paragraphs in each selected document are merged into a single paragraph.

Kutools for Word is the ultimate Word add-in that streamlines your work and boosts your document processing skills. Get It Now!

Merge or combine multiple lines into one single paragraph with VBA code

This method allows you to merge lines using VBA. Follow these steps:

  1. Select the lines that you want to merge into one paragraph.
  2. Press Alt + F11 to open the Microsoft Visual Basic for Applications window.
  3. Click "Insert" > "Module", and paste the code below:
    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("No text is selected. Do you want to merge all lines in the document 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 "Merged successfully!", 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 = "^13{1,}"
            .Replacement.Text = " "
            .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]"
            .Replacement.Text = "^p"
            .Execute Replace:=wdReplaceAll
        End With
    End Sub
  4. Press F5 to run the code. The selected lines will be merged into one paragraph.
    The selected paragraphs are merged into one single paragraph

Best Office Productivity Tools

Kutools for Word - Elevate Your Word Experience with Over 100 Remarkable Features!

πŸ€– Kutools AI Features: AI Assistant / Real-Time Assistant / Super Polish (Preserve Format) / Super Translate (Preserve Format) / AI Redaction / AI Proofread...

πŸ“˜ Document Mastery: Split Pages / Merge Documents / Export Selection in Various Formats (PDF/TXT/DOC/HTML...) / Batch Convert to PDF...

✏ Contents Editing: Batch Find and Replace across Multiple Files / Resize All Pictures / Transpose Table Rows and Columns / Convert Table to Text...

🧹 Effortless Clean: Sweap away Extra Spaces / Section Breaks / Text Boxes / Hyperlinks / For more removing tools, head to the Remove group...

βž• Creative Inserts: Insert Thousand Separators / Check Boxes / Radio Buttons / QR Code / Barcode / Multiple Pictures / Discover more in the Insert group...

πŸ” Precision Selections: Pinpoint Specific Pages / Tables / Shapes / Heading Paragraphs / Enhance navigation with more Select features...

⭐ Star Enhancements: Navigate to Any Location / Auto-Insert Repetitive Text / Toggle Between Document Windows / 11 Conversion Tools...

🌍 Supports 40+ Languages: Use Kutools in your preferred language – supports English, Spanish, German, French, Chinese, and 40+ others!

Kutools and Kutools Plus tabs on the Word Ribbon
πŸ‘‰ Want to try these features? Download Kutools for Word now! πŸš€
 

✨ Kutools for Office – One Installation, Five Powerful Tools!

Includes Office Tab Pro Β· Kutools for Excel Β· Kutools for Outlook Β· Kutools for Word Β· Kutools for PowerPoint

πŸ“¦ Get all 5 tools in one suite | πŸ”— Seamless integration with Microsoft Office | ⚑ Save time and boost productivity instantly

Best Office Productivity Tools

Kutools for Word - 100+ Tools for Word