There’s not one, but two easy ways to insert a horizontal line into a Word document.
Image: DMEPhotography, Getty Images/iStockphoto
Most of you already know that you can quickly add a horizontal line to a Word document by typing three hyphens and pressing Enter—but there’s more. There are several keyboard shortcuts and a built-in feature that lets you add a predefined line that you can copy, move, slant, and delete.
In this article, I’ll show you how to insert lines using both methods.
I’m using Office 365 Word (desktop) on a Windows 10 64-bit system, but you can use an older version of Word. The browser edition doesn’t support these features. There’s no demonstration file; you won’t need one.
SEE: Choosing your Windows 7 exit strategy: Four options (Tech Pro Research)
From the keyboard
Other than the three hyphens shortcut there are five others, for a total of six keyboard shortcuts for displaying a horizontal line in a Word document, as shown in Figure A.
Figure A: Use keyboard shortcuts to insert several different horizontal lines.
Simply type the three characters and press Enter, and Word will convert the three characters into its corresponding line. This magic is made possible by the AutoCorrect feature.
- To access this feature, click the File tab and click Options.
- In the left pane, click Proofing.
- To the right, click the AutoCorrect Options button.
- Then, click the AutoFormat As You Type tab.
- In the resulting dialog, check the Border lines in the Apply section (Figure B). This setting is in the same spot in all versions but finding it in older versions is a bit different: If you’re still using 2003, choose AutoCorrect from the Tools menu; 2007 users should click the Office button, and then click Word Options.
Figure B: Use this option to enable the shortcuts.
To disable this feature, uncheck the Border lines option in the Apply section. To temporarily usurp the feature, press Ctrl+z to undo the conversion. To remove the line, click the AutoCorrect Options dropdown (in the left margin) and choose Undo Border Line, as shown in Figure C. (But you must do so immediately.) You can also use this dropdown to disable the AutoCorrect feature. If the dropdown is no longer available, click the line (it won’t be apparent though; the cursor will appear to be above the line), and press Delete.
Figure C: Remove the line quickly.
If you decide to disable the option, you can quickly insert a horizontal line as follows:
- Place your cursor where you want to insert the line.
- Click the Home tab and then click the dropdown arrow for the Borders option in the Paragraph group.
- From the resulting list, select Horizontal Line.
To remove the line, select it and press Delete. A few formatting options are available; simply double-click the line to see what’s available.
To learn more about the AutoCorrect feature, read Harness the power of Word’s AutoCorrect feature
Sticky border problem
Word converts your set of three characters into a paragraph format. It’s actually a border and not a shape (which we’ll discuss briefly below). If you enter the three hyphens directly under a line of text, Word will attach a border to the text (paragraph). If you move the text, the line goes with it. If there’s a blank line between the text and the hyphen-generated line, the line stands alone. You can move it and delete it.
Once a line is anchored to text as a border, you can’t select and remove the line. How do you get rid of it? Click anywhere inside the textual paragraph and then click the Borders dropdown. Choose No Border, as shown in Figure D, and the sticky border is gone
Figure D: Remove the sticky border.
As a Lines shape
The lines produced by the keyboard shortcuts and AutoCorrect are certainly functional, but Word can draw lines at an angle too using a Lines shape. You’ll need to insert a true shape and not a paragraph-formatted border.
- To do so, click the Insert tab and click the Shapes dropdown (in the Illustrations group).
- Choose a line from the Lines section and click where you want the line to start.
- Drag a bit and click a second time where you want the line to end.
You can copy, move, or resize this line. To insert a straight line, hold down the Shift key. Either end point can be adjusted to be above or below the other point by dragging either point up or down. The point you aren’t moving will remain anchored to its position.
If you want both points to move, hold down the Ctrl key while you move one point or the other. The line responds similar to a child’s seesaw, as though the line were centered on a fulcrum, but only at first because you can drag the point a full 360 degrees.
Adding a horizontal line can provide a visual line of demarcation between two sections. Adding a vertical line will do the same thing. In a future article, I’ll show you how to add a vertical line to a document.
Microsoft Weekly Newsletter
Be your company’s Microsoft insider with the help of these Windows and Office tutorials and our experts’ analyses of Microsoft’s enterprise products.
Delivered Mondays and Wednesdays
Sign up today
Send me your question about Office
I answer readers’ questions when I can, but there’s no guarantee. Don’t send files unless requested; initial requests for help that arrive with attached files will be deleted unread. You can send screenshots of your data to help clarify your question. When contacting me, be as specific as possible. For example, “Please troubleshoot my workbook and fix what’s wrong” probably won’t get a response, but “Can you tell me why this formula isn’t returning the expected results?” might. Please mention the app and version that you’re using. I’m not reimbursed by TechRepublic for my time or expertise when helping readers, nor do I ask for a fee from readers I help. You can contact me at [email protected].
- How to combine Excel VLOOKUP() and PivotTable for simple solutions (TechRepublic)
- How to use conditional fields in a Word mail merge (TechRepublic)
- Office Q&A: Collapsible heading and delay send settings aren’t a cure all, but it’s close (TechRepublic)
- How to document Word AutoText and AutoCorrect entries (TechRepublic)
- How to document Word keyboard commands (TechRepublic)
- 10 free alternatives to Microsoft Word and Excel (TechRepublic download)
- Microsoft Office 365 for business: Everything you need to know (ZDNet)
- The 10 most important iPhone apps of all time (Download.com)
- It takes work to keep your data private online. These apps can help (CNET)
- Programming languages and developer career resources coverage (TechRepublic on Flipboard)