How to create a line in Microsoft Word and LibreOffice Writer

Updated: 05/01/2023 by Computer Hope
Lines in Microsoft Word and LibreOffice Writer

To create a horizontal line in Microsoft Word or LibreOffice Writer, use the AutoFormat feature. AutoFormat adds formatting to your text when you type certain symbols more than once and press Enter. For example, typing three consecutive hyphens ("---") and pressing Enter creates a solid horizontal line.

AutoFormat line examples

Below are symbols that create different types of lines. The image above shows how each type of formatting appears in Microsoft Word (on the left) and LibreOffice Writer (on the right).

Note

The options below for creating different types of lines in Microsoft Word only work for the Word desktop application. These options do not work in Word Online (the web version).

  • Single line - Type three hyphens (---) and press Enter.
  • Bold single line - Type three underscores (___) and press Enter.
  • Plain double lines - Type three equal signs (===) and press Enter.
  • Dotted line - Type three asterisks (***) and press Enter.
  • Wavy line - Type three tildes (~~~) and press Enter.
  • Triple line - Type three pounds (###) and press Enter.
Note

The last three options above result in variations of double lines in LibreOffice Writer. Creating a dotted line, wavy line, and triple line in Writer is not supported with AutoFormat capabilities.

If it's not working, enable AutoFormat

If typing three characters and pressing Enter does not change the characters to a line, AutoFormat is likely not enabled. To enable AutoFormat, follow the steps below.

Microsoft Word 2007 to Word 365

  1. In Microsoft Word, click the File tab.
  2. Click Options in the left navigation menu.
  3. In the Word Options window, click the Proofing option.
  4. Click the AutoCorrect Options button.
  5. In the AutoCorrect window, click the AutoFormat as you type tab.
  6. In the Apply as you type section, check the Border lines box, and click OK.

Enable border lines in Microsoft Word AutoFormat options.

Note

The Border lines option is not available in Microsoft Word Online (the web version).

LibreOffice Writer

  1. In LibreOffice Writer, click Tools in the menu bar.
  2. In the drop-down menu, select AutoCorrect, and then AutoCorrect Options.
  3. In the AutoCorrect window, click the Options tab.
  4. Check the Apply border box, and click OK.

Apply border option in LibreOffice Writer AutoCorrect settings.

Add a horizontal line from the Home tab

In addition to using the AutoFormat feature mentioned above, you can insert a line using the Horizontal Line tool in the Home tab (shown in the picture).

Note

Adding a horizontal line in Microsoft Word only works for the Word desktop application. It is not currently possible in Word Online (the web version).

Horizontal Line tool in Microsoft Word

After adding a line using the Horizontal Line tool, you can double-click it to change the line's appearance. For example, you could change its width, height, and color.