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:

dov-removehorline-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

Kutools for Word: Add 100 New Advanced Features to Word 2003/2007/2010/2013/2016.
Office Tab: Enable Tabbed Editing and Browsing in Office, Just Like Chrome, Firefox, IE 8/9/10.
Classic Menu for Office: Bring Old Look of Office 2003 Back to Office 2007, 2010, 2013 and 2016.

arrow blue right bubbleManually remove all horizontal lines one by one

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

Step 1: Select the horizontal lines you want to remove;

Step 2: Press Delete button on the keyboard to remove the selected horizontal line.

Sometimes when you try to remove the horizontal line by selecting it and pressing Delete, but it remains there. You can try the following:

Step 1: Put the cursor above the line;

Step 2: Click on the Page Borders item in the Page Background group of Page Layout tab;

Step 3: Click Borders tab, click None, click OK.

dov-removehorline-2


arrow blue right bubbleRemove 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:

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

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

Step 3: Click Run button or press F5 to apply VBA directly.

The code to remove all horizontal lines from the document:

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


arrow blue right bubbleRemove 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, a handy add-in, includes groups of tools to ease your work and enhance your ability of processing word document. Free Trial for 45 days! Get It Now!

Click kutools > click Remove All in the Clear group > select Remove Paragraph bottom horizontal line to remove all horizontal lines.

dov-removehorline-3


 

arrow blue right bubble Kutools for Word

More than 100 Advanced Functions for Word 2003, 2007, 2010, 2013 and 2016

shot-kutools-700-225-kte

More Features | Free Download | Only $39.00 for hundreds of functions

Comments  

Permalink -1 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): ###
2014-09-16 20:18 Reply Reply with quote Quote
Permalink -1 admin_jay
Quoting 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): ###

Yes, you are right. 3 HASH signs + Enter
2014-09-17 06:01 Reply Reply with quote Quote
Permalink 0 IMKarla
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(wdB orderBottom).Li neStyle = 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).
2014-10-13 17:00 Reply Reply with quote Quote
Permalink 0 sharon
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.
2014-11-03 16:36 Reply Reply with quote Quote
Permalink 0 Codelover 26
This is amazing!!! BIG THANK YOU for putting the VBA code.
Searched in google but yours was the only thing that came up.
2014-11-18 23:52 Reply Reply with quote Quote
Permalink 0 Carski7
The manual methods did not work, but the VBA code did. Very nice!
2015-01-20 23:24 Reply Reply with quote Quote
Permalink 0 fandoog
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.
2015-04-14 02:59 Reply Reply with quote Quote
Permalink 0 sojib
140 Ogrady St.
Fall River, MA 02720-4911
USA
How 3 lines made one line???
2015-07-05 04:40 Reply Reply with quote Quote
Permalink 0 Brooke
I love you! OMG.
The VBA thing worked!!!!

That dump line was driving me crazy.
2016-05-05 02:32 Reply Reply with quote Quote
Permalink 0 Drew
Thank you, thank you, thank you! 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 programmaticall y split these documents into sub-files.

Thanks again
2016-06-16 23:24 Reply Reply with quote Quote
Permalink 0 Izza
The VBA code method worked. Thanks so much!
2017-05-22 09:28 Reply Reply with quote Quote

Add comment


Security code
Refresh