Skip to main content

How to remove all horizontal lines from Word document?

Author: Amanda Li Last Modified: 2020-11-27

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 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 > RemoveHorizontal Line, see screenshot: 

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!


Best Office Productivity Tools

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

🤖 Kutools AI Assistant: Transform your writing with AI - Generate Content  /  Rewrite Text  /  Summarize Documents  /  Get Quick Answers, all within Word

📘 Document Mastery: Split Pages  /  Merge Documents  /  Export Selection in Various Formats (PDF/TXT/DOC/HTML...)  /  Batch Convert to PDF  /  Export Pages as Images  /  Print Multiple Files at once...

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  /  All Headers  /  Text Boxes  /  Hyperlinks  /  For more removing tools, head to the Remove group...

Creative Inserts: Insert Thousand Separators  /  Check Boxes  /  Radio Buttons  /  QR Code  /  Barcode  /  Diagonal Line Table  /  Equation Caption  /  Image Caption  /  Table Caption  /  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...

👉 Want to try these features? Download Kutools for Word now! 🚀
 
Comments (13)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
The VBA code returns the error 'compile error: must be first statement on line' for the first line. Any thoughts?
This comment was minimized by the moderator on the site
The VBA code returns the error - compile error: must be first statement on line for the first line.
This comment was minimized by the moderator on the site
The VBA code method worked. Thanks so much!
This comment was minimized by the moderator on the site
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 programmatically split these documents into sub-files. Thanks again
This comment was minimized by the moderator on the site
I love you! OMG. The VBA thing worked!!!! That dump line was driving me crazy.
There are no comments posted here yet
Load More
Leave your comments
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations