Ĭlick Shapes, and then on the pop-up menu, click Lines and Connectors. On the Standard toolbar, click Show or hide the Media Browser. On the Home tab, under Insert, click Shape, point to Lines and Connectors, and then click the line style that you want. The fastest way to add a horizontal line or rule is to use the AutoFormat feature. Type the following characters and then press Enter or Return to insert lines: You can also insert a horizontal line using keyboard shortcuts (which insert border lines as AutoCorrect entries). To insert a plain single line, type three hyphens (-). It will quickly insert a horizontal line in the document. To insert a plain double line, type three equal signs ().
Insert a line by typing a few characters. For inserting horizontal line, place the insert cursor where you want to insert it and head over Home tab, from Paragraph group, click drop-down button and select Horizontal Line as shown below. Following code is an example on how to add horizontal lines to Microsoft Word document by using DocX package programmatically in C without needing of Microsoft Word installed. Select a location in the document, hold and drag your pointer to a different location, and then release the mouse button. In your document, hold down the mouse button and draw the line where you want.Ĭlick the line that you want to delete, and then on the Standard toolbar, click Cut. Under Lines, select any line style you like. On the Home tab, under Insert, click Shape, point to Lines and Connectors, and then click Scribble. Under Shape Styles, click the arrow next to Line, point to Arrows, and then click the arrow that you want. Under Shape Styles, click the arrow next to Line, point to Weights, and then click the width that you want. Under Shape Styles, click the arrow next to Line, and then click the color that you want.
To see more styles, point to a style, and then click.
Under Shape Styles, click the style that you want. Tip: To draw a line at a pre-set angle, such as vertical or horizontal, hold down SHIFT as you draw the line.Ĭlick the line that you want to change, and then click the Format tab. To create a custom line weight, click More Lines, and then choose the options that you want. To create a custom style, click More Lines, and then choose the options that you want.Ĭlick the Shape Format tab, click the arrow next to Shape Outline, point to Weight, and then click the line weight that you want. If you want to change multiple lines, select the first line, and then press and hold while you select the other lines.Ĭlick the Shape Format tab, click the arrow next to Shape Outline, point to Dashes, and then click the style you want. Custom colors are not updated if you later change the document theme.
You can also mix your own color using the color wheel or the color palettes. To use a color that isn't a theme color, click More Outline Colors, and then click the color you want. Note: If you don't see the Shape Format tab, make sure you've selected the line.