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:
How to remove all horizontal lines from the document? This tutorial will tell you the answers.
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.
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!
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;
3. Click Borders tab, click None, click OK. And the selected horizontal line will be deleted at once.
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.
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:
2. And then all horizontal lines from the whole document will be removed at once, see screenshot:
Note: If you want to delete part of horizontal lines, please selecte the range data, and then apply this feature.
Recommended Word Productivity Tools
- 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 1, 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...
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
To post as a guest, your comment is unpublished.· 8 months agoThe 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.· 8 months agoThe 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.· 2 years agoThe VBA code method worked. Thanks so much!
To post as a guest, your comment is unpublished.· 3 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.
To post as a guest, your comment is unpublished.· 3 years agoI love you! OMG.
The VBA thing worked!!!!
That dump line was driving me crazy.