How to remove all horizontal lines from Word document?

Horizontal lines can divide paragraphs clearly. Many users already know they can add horizontal lines to document by typing three hyphens, underscore or asterisks and so on, and then pressing Enter. See screenshot:

doc remove horizontal lines 1

How to remove all horizontal lines from the document? This tutorial will tell you the answers.

Manually remove all horizontal lines one by one

Remove all horizontal lines with VBA code

Remove all horizontal lines with Kutools for Word


Manually remove all horizontal lines one by one

If you just want to remove few horizontal lines, you can manually remove them as follows:

1. Put the cursor above the line;

2. Click on the Page Borders item in the Page Background group of Design tab;

doc remove horizontal lines 2

3. Click Borders tab, click None, click OK. And the selected horizontal line will be deleted at once.

doc remove horizontal lines 3


Remove all horizontal lines from a Word document:

With Kutools for Word's Horizontal line feature, you can remoce all kinds of horizontal lines from the Word document with ony one click.

doc remove horizontal lines 6

Kutools for Word: with more than 100 handy Word add-ins, free to try with no limitation in 60 days. Click to Download and free trial Now!


Remove all horizontal lines with VBA code

If you want to remove all horizontal lines in the document, it’s tedious to remove them manually. VBA can make it easier, do as follows:

1. Press Alt+F11 to open the VBA window in Word;

2. Click Module from Insert tab, and insert the code into the Module window;

VBA code: Remove all horizontal lines in a Word document:

Sub removehline()
Dim ils As Paragraph
For Each ils In ActiveDocument.Paragraphs
ils.Borders(wdBorderBottom).LineStyle =wdLineStyleNone
Next ils
End Sub

3. Click Run button or press F5 to apply VBA directly. And all horizontal lines have been deleted from the document.


Remove all horizontal lines with Kutools for Word

It’s easiest remove all horizontal lines from the whole document or the selection of the document with Kutools for Word.

Kutools for Word : with more than 100 handy Word add-ins, free to try with no limitation in 60 days. 

1. Click kutools > Horizontal Line from the Remove group, see screenshot: 

doc remove horizontal lines 4

2. And then all horizontal lines from the whole document will be removed at once, see screenshot:

doc remove horizontal lines 5

Note: If you want to delete part of horizontal lines, please selecte the range data, and then apply this feature.

Click to download Kutools for Word and free trial now!


Demo: Remove all horizontal lines in Word

Kutools for Word: with more than 100 handy Word add-ins, free to try with no limitation in 60 days. Download and free trial now!




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...
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    mattheweetherington@gmail.com · 1 years ago
    The VBA code returns the error 'compile error: must be first statement on line' for the first line. Any thoughts?
  • To post as a guest, your comment is unpublished.
    Matt · 1 years ago
    The VBA code returns the error - compile error: must be first statement on line for the first line.
  • To post as a guest, your comment is unpublished.
    Izza · 3 years ago
    The VBA code method worked. Thanks so much!
  • To post as a guest, your comment is unpublished.
    Drew · 4 years ago
    [b]Thank you, thank you, thank you! [/b] I have a multi-gigabyte library of DOCX files that use horizontal lines (=== and ---) as internal section dividers. Thanks to your tip (perhaps the only instance on the web?) I will be able to programmatically split these documents into sub-files.

    Thanks again
  • To post as a guest, your comment is unpublished.
    Brooke · 4 years ago
    I love you! OMG.
    The VBA thing worked!!!!

    That dump line was driving me crazy.
  • To post as a guest, your comment is unpublished.
    sojib · 5 years ago
    140 Ogrady St.
    Fall River, MA 02720-4911
    USA
    How 3 lines made one line???
  • To post as a guest, your comment is unpublished.
    fandoog · 5 years ago
    None of this page border stuff worked at all. I searched the document. The horizontal line was at the end, and 10 pages earlier was the culprit, a roman paragraph number lurking in a sentence for no reason at all. When I deleted it it removed the line 10 pages away.
    I will cut and pate the bugger here. In fact, you can have a set of them from 1 to 6. The then put a line at the bottom of every page. Go figure. MS Word 2007 is the platform.


    They are there, but do not display. They are just above this line, and will highlight if you mouse over.
  • To post as a guest, your comment is unpublished.
    Carski7 · 5 years ago
    The manual methods did not work, but the VBA code did. Very nice!
  • To post as a guest, your comment is unpublished.
    Codelover 26 · 5 years ago
    This is amazing!!! BIG THANK YOU for putting the VBA code.
    Searched in google but yours was the only thing that came up.
  • To post as a guest, your comment is unpublished.
    sharon · 5 years ago
    OMG! Thank you. I ran a macro as instructed and managed to remove the line. You were the onlly site among 3 to propose this solution.
  • To post as a guest, your comment is unpublished.
    IMKarla · 5 years ago
    My Word doc is generated from RoboHelp. Somewhere in there is a horizontal line, not a border. The doc is 1300+ pages. I searched for graphic one at a time and did not find it. Then I used your macro, and it failed at ils.Borders(wdBorderBottom).LineStyle = wdLineStyleNone. I have lots and lots of tables, so I'm glad it failed. :eek: I really just want to know what the VB script is for horizontal line (not border).
  • To post as a guest, your comment is unpublished.
    Chris · 5 years ago
    3 "pound signs" won't do anything. 3 pound signs are £££. That does not create any line. I think you mean 3 HASH signs (otherwise known as number signs): ###
    • To post as a guest, your comment is unpublished.
      admin_jay · 5 years ago
      [quote name="Chris"]3 "pound signs" won't do anything. 3 pound signs are £££. That does not create any line. I think you mean 3 HASH signs (otherwise known as number signs): ###[/quote]
      Yes, you are right. 3 HASH signs + Enter