Create a horizontal line in Microsoft Word and LibreOffice Writer
It's easy to create horizontal lines in either Microsoft Word or LibreOffice Writer, by using the AutoFormat feature. It will automatically add certain formatting to your text when you type certain symbols more than once, and press Enter.
For example, typing three consecutive hyphens ("---") and pressing Enter will create a solid horizontal line. Similarly, typing "===" (Enter) will create a double solid line.
There are other combinations, such as typing three underscore, tilde, asterisk, or pound symbols. The image above shows how each type of formatting appears in Word (on the left) and Writer (on the right).
If it's not working, enable AutoFormat
If typing three characters and pressing Enter does not change automatically to a horizontal line, AutoFormat may need to be enabled. To enable AutoFormat, follow the steps below.
In Microsoft Word
- Open Tools → AutoCorrect.
- In the AutoCorrect window, click the AutoFormat as you type tab.
- In AutoFormat, check the Borders box.
In LibreOffice Writer
- Open Tools → AutoCorrect → AutoCorrect Options.
- In the Options tab, check the Apply Borders box.
Tip: If you prefer to disable AutoFormatting, uncheck the box.