- Remove From My Forums
-
Вопрос
-
Hi,
MS-Word does provide the underline feature. In the similar way, is there a possibility to insert single vertical stroke as well as double vertical stoke on the top f each character as mentioned below.
For the record, the inserted image is from a Telugu language manual. Please help me with your thoughts (or) recommendations to accomplish these strokes.
Thanks for reading
Every thing is perfect as long as you share
-
Перемещено
Chenchen Li
21 ноября 2016 г. 6:59
-
Перемещено
Все ответы
-
Try the following:
- Make sure that NumLock is on.
- Type a letter.
- Press Alt+781 for a single vertical line above, or Alt+782 for a double vertical line above, using the digits on the numeric keypad.
- Alternatively, type 030D in the document, then press Alt+X for a single vertical line above.
- Similar for a double vertical line above, but with 030E.
Regards, Hans Vogelaar (http://www.eileenslounge.com)
-
Предложено в качестве ответа
Steve Fan
22 ноября 2016 г. 5:34 -
Отменено предложение в качестве ответа
Chakravarthy
22 ноября 2016 г. 7:39
-
Hi,
Thanks for posting here.
This forum(Word for Developers) is for developer discussions and questions involving Microsoft Word, like developing issues related with Word Object model.
Since your issue is more related to Word Product, I would move this thread into the following forum
https://social.technet.microsoft.com/Forums/office/en-US/home?forum=word
Regards,
Celeste
MSDN Community Support
Please remember to click «Mark as Answer» the responses that resolved your issue, and to click «Unmark as Answer» if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to
MSDN Support, feel free to contact MSDNFSF@microsoft.com. -
Hi Chakravarthy,
Please check if Hans’s suggestion is helpful to your situation.
If you need further assistance on this issue, please feel free to post back.
Regards,
Steve Fan
Please remember to mark the replies as answers if they helped.
If you have feedback for TechNet Subscriber Support, contact
tnmff@microsoft.com. -
Hi,
Thanks for the suggestion. But, the challenge is towards making this automated way, through C# program.
Thus, please help me with the mechanism for identifying the same as either ASCII or any
Regards,
Every thing is perfect as long as you share
-
I hope somebody else can help you with that, I don’t speak C#. Sorry.
Regards, Hans Vogelaar (http://www.eileenslounge.com)
-
Hi,
Thanks for alerting me. But, surprisingly, I couldn’t find a specific forum for Word alone. Apart of that, my interest is to have some information for the developers, not for content writers.
I would like to understand how can I make the automation for the given steps by Hans.
Regards,
Every thing is perfect as long as you share
-
Hi Chakravarthy,
If you want to make the automation for the given steps by Hans, you may try to record a macro when manually doing this. Then, you can consider to convert the recording script to C#. I have tried recording the process and here is the recorded macro:
Selection.TypeText Text:="text" Selection.MoveLeft Unit:=wdCharacter, Count:=1, Extend:=wdExtend Selection.TypeText Text:=ChrW(781)
We thought you wanted to do this manually so your question was moved to our forum, which is for general questions and feedback related to Microsoft Word. If you want to automate the process via C#, the
Word for Developers forum is dedicated to your request. I’d recommend you post a new question to the Word for Developers forum, or if you like, I can help move the thread back to the Word for Developers forum.
Thank you for your understanding.
Best Regards,
Steve Fan
Please remember to mark the replies as answers if they helped.
If you have feedback for TechNet Subscriber Support, contact
tnmff@microsoft.com. -
Hi,
I have tried the mentioned. I have got the result as displayed in the first line of the below image. Please note the long vertical line that has the double lines at the top. All I want is, from the second line.
Will that be a possibility?
Every thing is perfect as long as you share
-
Tossing in an idea from old tech.
Might the
Advance Field be able to assist with this?
https://support.microsoft.com/office/field-codes-advance-field-6379bd1b-49be-4c85-95e6-f42b44ab0e70
Charles Kenyon Madison, WI
-
Well, guess that you have not given attention to the position of » .. they are not appearing on top of the Char, but, next to the char as superscript.
Every thing is perfect as long as you share
-
Well, guess that you have not given attention to the position of » .. they are not appearing on top of the Char, but, next to the char as superscript.
Every thing is perfect as long as you share
The Advance field lets you put characters on top of each other.
Charles Kenyon Madison, WI
Underlining is a common task in Word, and easily done, but what if you need to overline (also called overscore or overbar), some text? Overlining is common in scientific fields, but there are various reasons for overlining text. However, Word doesn’t make it easy.
You can apply overlining to your text in Word using a field code or the equation editor, or you can add a paragraph border to the top of the text.
Using a Field Code
First, we’ll show you how to use a field code to apply overlining to text. Open an existing or new document in Word and place the cursor where you want to put the text with overlining. Press “Ctrl + F9” to insert field code brackets, which are highlighted in gray. The cursor is automatically placed in between the brackets.
Enter the following text between the brackets.
EQ x to()
NOTE: There is a space between “EQ” and “x” and between “x” and “t()”. “EQ” is the field code used to create an equation and the “x” and “to” are switches used to format the equation or text. There are other switches you can use in the EQ field code, including ones that apply bottom, right, left, and box borders to the equation or text.
Put the cursor between the parentheses and enter the text you want to overline.
To display this as text rather than a field code, right-click anywhere in the field code and select “Toggle Field Codes” from the popup menu.
The text you entered into the field code displays with a line above it. When the field code displays as normal text, you can highlight it and apply various formatting to it, such as font, size, bold, color, etc.
NOTE: To display the field code again, simply right-click in the text and select “Toggle Field Codes” again. When you put the cursor in text generated from using a field code, the text is highlighted in gray, just like the field code.
If you want the line to extend beyond either end of the text, add spaces when entering the text into the field code. This is useful for creating lines with names under them for signing official documents.
Field codes work in all versions of Word, for both Windows and Mac.
Using the Equation Editor
You can also apply overlining to text using the equation editor. To do so, click the “Insert” tab in your Word document.
In the “Symbols” section of the “Insert” tab, click “Equation”.
The “Design” tab under “Equation Tools” displays. In the “Structures” section, click “Accent” to access various accents you can apply to the top of the text in the equation. There are two different accents you can use. Select either the “Bar” under “Accents” on the drop-down menu…
…or select the “Overbar” under “Overbars and Underbars”. The “Overbar” produces a slightly longer line above the text than the “Bar”.
The selected accent displays over the small dotted box in the equation object.
To enter your text, click on the dotted box to select it.
Type your text into the dotted box. The line extends to cover the text as you type.
Click outside of the equation object to view the finished “equation”, or overlined text.
Notice that when entering a hyphenated word or phrase into an equation in the Equation Editor, such as “How-To Geek”, there are spaces before and after the dash. That’s because it’s an equation and Word is treating the dash as a minus sign between two operands. If you would rather not have those spaces (or if you don’t have the Equation Editor installed), the first method above, or the following method, may work better for you.
Adding a Paragraph Border
Applying an overline to text can also be accomplished using paragraph borders. Type the text you want to overline into your Word document and make sure the “Home” tab is active on the ribbon bar. Click the down arrow on the “Borders” button in the “Paragraph” section of the “Home” tab.
Select “Top Border” from the drop-down menu.
The line above the paragraph extends from the left margin to the right margin. However, you can adjust the indents for that paragraph to shorten the line. To do this, you must make the ruler visible. Click the “View” tab.
In the “Show” section of the “View” tab, click the “Ruler” check box so there is a check mark in the check box.
To change the indents for the paragraph, put the cursor in the paragraph and put your mouse over one of the indent markers on the ruler. For this example, we’ll make the “Right Indent” bigger, shortening the line from the right.
NOTE: To move the left indent, put your mouse over the small box directly under the two small triangles on the left side of the ruler to move the triangles together. Do NOT move the triangles separately.
Click and drag the indent until the line is the length you want.
Release the mouse button when you’re done moving the indent. The line is now shorter.
Until Microsoft adds this capability as a regular feature, these methods provide ways around the limitation. They may not be as easy as highlighting text and clicking a single button, or pressing a shortcut key, but they’ll work in a pinch.
READ NEXT
- › 5 Ways to Underline in Microsoft Word
- › Why Your Phone Charging Cable Needs a USB Condom
- › Spotify Is Shutting Down Its Free Online Game
- › Five Types of Phone Damage That Aren’t Covered by Your Free Warranty
- › Save Hundreds on Elegoo’s New PHECDA Laser Engraver Through Kickstarter
- › Android’s Nearby Share Has (Unofficially) Arrived on Mac
- › This 64 GB Flash Drive From Samsung Is Just $8 Right Now
I learnt a new word the other day: macron. So, what’s a macron? It’s a bar or line over the top of a word or letter, such as those used to indicate the mean in mathematical equations.
And why did I learn this word? Because Stephanie, one of my team’s authors, wanted a line over the top of her capital D. She could get the line using Microsoft Word’s equation editor, but as she had to define what the D with the overbar/overline/overscore meant, she wanted to insert it into the Terms list too. However, it wouldn’t copy properly. So she asked me.
Equations are one of the few areas in Word that I’ve never tackled, so, as I told Steph, it was all a new experience for me. I confirmed that copying the D with the overbar was problematic when I used the equation editor, so I figured there had to be another way to get a line on top of a letter. And there is. In fact, there are several ways and the method you choose should be the one that gives you the result you’re looking for, taking into account your circumstances (e.g. will you have to copy from one document to another? is the method easy for you to use/remember? do you have to create a lot of these? is the font important?).
I Googled the problem and after some hunting around I discovered some great resources (listed at the end of this post), and discovered that the line over the top of a letter is called a ‘macron’. Armed with that little piece of information, back to Google, where I found out more about this beastie.
Please note: Some letters already have a macron built-in. Check the Windows Character Map (Start > All Programs > Accessories > System Tools > Character Map on Vista) or use a program such as BabelMap to see if there’s an existing character you can use — if there is, use that as it’s the quickest and simplest method. If your letter doesn’t have an existing character (D doesn’t), you’ll have to create it yourself, which is what the rest of this article is about.
The methods below show how to create your own letter with a macron (I’ll use D as the example). I’ve used Word 2007 in these instructions, but Word 2003 and later versions of Word is similar for the most part.
Easiest ever method!
September 2018: Anik8G, a commenter on this post, shared his solution and it’s super easy. You can probably ignore all other solutions and use his. He has a short YouTube video that describes what he does: https://www.youtube.com/watch?v=3_h7ukThU_4, but you’ll likely need a little more information for it to work.
His solution uses the built-in Math AutoCorrect feature, which you need to turn on if it’s not already on. It’s under File > Options > Proofing. Click the AutoCorrect Options button, then select the Math AutoCorrect tab and check the two check boxes.
Look at the Replace and With lists, and note down the Replace string you want to add over your letter (in this example, I needed bar). Click OK and get back to your document. Now, type your letter, followed immediately by the Replace string, then a space. For my example, I typed Dbar<space> and that automatically added a bar over the top of the letter. Just brilliant!
Method 1: Use Word’s Equation Editor
Option 1: Use a built-in accent character
- Go to the Insert tab > Symbols group (far right), then click Equation.
- Select Insert New Equation from the bottom of the list.
This opens the Equation Tools > Design tab and puts a Type equation here box into your document.
- Click Accent on the Design tab > Structures group.
- Scroll down past the Boxed Formulas section to the Overbars and Underbars section.
- Click the Overbar icon.
You’ll see something like this in your document:
- Click in the dashed box, then type D.
- Click outside the equation box to hide it; you can show it again by clicking on the D with the macron.
Your character will look like this:
Option 2: Create your own
- Go to the Insert tab > Symbols group (far right), then click Equation.
- Select Insert New Equation from the bottom of the list. This opens the Equation Tools > Design tab and puts a Type equation here box into your document.
- Type D in the equation box, then select it.
- Click Accent on the Design tab > Structures group.
- Click the Bar icon.
You’ll see something like this:
- Click in the dashed box, then type D.
- Click away from the equation box to hide it; you can show it again by clicking on the D with the macron.
Your character will look like this:
Note that the macron created using this option is slightly narrower than that created using the built-in accent (above), and is closer to the top of the letter.
Advantages:
- Quick and easy
- You get a properly formatted macron over the letter
Disadvantages:
- You may not be able to change the font (I wasn’t able to change it from Cambria Math)
- If you copy this equation from one Word document to another, you must remember to select Keep Source Formatting as soon as you paste it, otherwise the letter and its macron are treated as two separate characters.
Method 2: Use Word’s Equation field, with switches
To use this method, you need to know the character code to create a macron. If you have a numeric keypad, it’s Alt+0175; if you have a keyboard without a numeric keypad, it’s 00af (they are zeros) followed immediately by Alt+x. Test these key combinations in your document first to make sure you can create the macron successfully with the keyboard.
Option 1: Using the built-in field codes and switches
- Go to the Insert tab > Text group, then click Quick Parts. (Word 2003: Insert > Field)
- Select Field.
- Scroll down the list of Field names and select Eq.
- Click Field Codes.
- Click Options.
- Select the O() switch, then click Add to Field.
- In the Field codes: EQ Instructions box, type D,<macron_code> between the parentheses.
The <macron_code> is the key combination you tested earlier to see if it worked — either Alt+0175 on the numeric keypad, or 00af followed by Alt+x. Make sure you also insert the comma between the D and the macron.
- Click OK to close the Field Options dialog box.
- Click OK again to close the Field dialog box.
Your letter with its macron should look like that below (I have field shading turned on); change the font if you don’t see the macron:
Option 2: Using the built-in field codes and Equation Editor
- Go to the Insert tab > Text group, then click Quick Parts. (Word 2003: Insert > Field)
- Select Field.
- Scroll down the list of Field names and select Eq.
- Click Equation Editor.
- A text box is added to the document, along with a floating Equation toolbar.
- Click the Overbar icon, then the icon for the bar.
- Type the letter D in the text box.
- Close the Equation toolbar, then click away from the text box.
You should see something like this:
Option 3: Create your own field
- Press Ctrl+F9 to insert an empty field.
- Type EQ<space>O (D,<macron_code>) between the curly brackets of the field.
- Right-click on the field, then select Toggle Field Codes to show the result:
Advantages:
- Quick and relatively easy
Disadvantages:
- Some fonts, such as Calibri (Body), do not display the macron. If you don’t see the macron over the letter, try changing the font — Arial, Times New Roman (TNR), Courier New all work; however, TNR puts the macron very close to the top of the D, making it hard to read. You’ll need to experiment with fonts.
- You need to know how to create a macron using the keyboard.
- You should have a basic understanding of field codes and switches.
Method 3: Create a box around the letter showing only the top border
- Go to the Insert tab > Text group, then click Quick Parts. (Word 2003: Insert > Field)
- Select Field.
- Scroll down the list of Field names and select Eq.
- Click Field Codes.
- Click Options.
- Select the X() switch, then click Add to Field.
- In the Field codes: EQ Instructions box, type D between the parentheses.
- Next, type a space after the X followed by to (for ‘top border’) then another space.
- Click OK to close the Field Options dialog box.
- Click OK again to close the Field dialog box.
Your letter with its macron should look like that below; change the font if you don’t see the macron:
Advantages:
- Quick and relatively easy
Disadvantages:
- You end up with a large space after the letter so if it’s to be part of a word, it will look strange
- You get a longer line over the letter.
- You should have a basic understanding of field codes and switches.
Method 4: Cheat!
Seriously. Sometimes we can overthink stuff, and if it’s a one-off and you’re limited for time, using a workaround may be your best option.
- Either create a graphic of what you want using graphics software, or take a screen capture of the full equation then crop it to show just what you want.
- Insert the graphic into the document.
Advantages:
- Quick and easy if you know how to use graphics and/or screen capture software
- Useful if you only have to do a few
Disadvantages:
- Can’t be edited easily if you need to change the letter in the graphic — you may have to create a new graphic or screen shot
See also:
- https://wordribbon.tips.net/T004314_Overlining_Characters.html
- BabelMap — 100,000+ Unicode characters: https://cybertext.wordpress.com/2009/08/14/all-100k-unicode-characters-and-more/
- Suzanne Barnhill’s excellent article on creating overbars: http://wordfaqs.ssbarnhill.com/Overbar.htm (Suzanne is a Microsoft Word MVP)
- Wikipedia article on macrons: https://en.wikipedia.org/wiki/Macron_(diacritic)
[Links last checked September 2018]
Download Article
A user-friendly guide to making different types of lines in Microsoft Word
Download Article
- Using Shapes to Draw a Line
- Using Borders to Add a Line
- Using Keyboard Shortcuts
- Using the Mobile App
- Q&A
- Tips
|
|
|
|
|
Do you want to create a horizontal line in your resumé or other Microsoft Word document? If you want to customize the color and format of the line, you can use the Shapes tool. If you need to make a quick, basic line, you can use the keyboard shortcut. While you can use the keyboard shortcut on Windows and Mac, you cannot use it on the mobile app. This wikiHow will show you how to insert different lines in Microsoft Word on your Windows, Mac, iPhone, or Android device.
Things You Should Know
- On desktop, go to the Insert tab. Click Shapes, then select a line. Click and drag across the document to create a line.
- To customize the line, double-click it. Click Shape Outline to change the color.
- On mobile, click the three dots. Tap Home and select Insert. Tap Shapes to select a line. Tap and drag across the document to create a line.
-
1
Open Microsoft Word on your Windows or Mac computer. Click or double-click the Word app icon, which resembles a white «W» on a dark-blue background.
- If you want to draw a line in an existing Word document, double-click the Word document to open it and skip the next step.
- You’ll need a subscription to use Office 365.
-
2
Click Blank document. It’s in the upper-left side of the page.
Advertisement
-
3
Click the Insert tab. This tab is in the blue ribbon at the top of the Word window, between Home and Draw.
-
4
Click Shapes. It’s in the Insert toolbar, next to the icon of an overlapping circle and square.
- A drop-down menu will appear.
-
5
Select a line shape. In the «Lines» heading, click one of the line templates. You can choose a line, line arrow, double line arrow, and more.
-
6
Draw your line. Click and drag across the document to create your line.
- If you need to adjust the line’s length and orientation, click the left or right circle. Drag it left or right to adjust the length, or drag it up and down to adjust the orientation.
- To move the line, double-click and drag it to the desired position.
Advertisement
-
1
Open Microsoft Word on your Windows or Mac computer. Click or double-click the Word app icon, which resembles a white «W» on a dark-blue background.
- If you want to draw a line in an existing Word document, double-click the Word document to open it and skip the next step.
-
2
Click Blank document. It’s in the upper-left side of the page.
-
3
Click the Home tab. This tab is in the blue ribbon at the top of the Word window, between File and Insert.
- You may already be on this tab by default.
-
4
Click the «Borders» arrow. This is next to the icon of the dotted square with a solid bottom line.
- A drop-down menu will open.
-
5
Click Horizontal Line. This will be towards the bottom, above Draw Table.
- A horizontal line will be added.
-
6
Format your line. Double-click the line; a dialogue box will appear.
- To change the line thickness, use the up and down arrow below Height. The higher the number, the thicker the line will be.
- To change the color, click the color box underneath Color. Select your desired color.
- Click OK to save and apply your changes.
- To move the line, double-click and drag it to the desired position.
Advertisement
-
1
Open Microsoft Word on your Windows or Mac computer. Click or double-click the Word app icon, which resembles a white «W» on a dark-blue background.[1]
- If you want to draw a line in an existing Word document, double-click the Word document to open it and skip the next step.
-
2
Click Blank document. It’s in the upper-left side of the page.
-
3
Place your cursor where you want your line to appear. You’ll need to be on a blank line, as this won’t work if there is text before or after your cursor on the same line.
- You’ll be creating a horizontal line that spans from one edge of your page to the other. The line will stop at your set margins.
- If you want to make the line span the whole page, you’ll need to change your document margins.
-
4
Type three dashes in a row. Use your dash key on the number row at the top of your keyboard, or on the numeric pad.
-
5
Press ↵ Enter to convert the dashes into a line. AutoCorrect will automatically create a solid line that will situate itself directly beneath the previous line of text.
- Note that the line does not occupy the space of a line of text, but instead exists between lines of text.
- If you do not have AutoCorrect enabled, do so by clicking File → Options → Proofing → AutoCorrect Options…. This will open a new window.
- Make sure the Border Lines box is checked. This can be found underneath Apply as you type.
- If you want to turn off AutoCorrect, uncheck the boxes.
-
6
Use different characters for different line styles. There are a variety of different lines that you can create by using characters other than the dash:[2]
- Thin line: Three hyphens (-).
- Thick line: Three underscores (_).
- Double line: Three equal signs (=).
- Dotted line: Three asterisk (*).
- Triple line: Three pound signs (#).
- Squiggly line: Three tildes (~).
-
7
Move the line by entering text above it. You can prompt the line to move down by typing text above it and then pressing Enter.
- Deleting text above the line will prompt it to move upward.
Advertisement
-
1
Open a document in the Microsoft Word app. This looks like a blue notebook next to a W.
- Microsoft Word is available for iOS in the App Store and for Android in the Google Play Store.
- Tap Blank document to open a new document or tap a file to open an existing document.
-
2
Tap ••• . This can be found above the keyboard, to the right.
- If you don’t see your keyboard, tap the document to bring it up.
- A new menu will open.
-
3
Tap Home. This will be to the left of the formatting window.
- A drop-down menu will open.
-
4
Tap Insert. You’ll see a list of all objects you can insert.
-
5
Tap Shapes. This is next to the icon of an overlapping circle and square.
-
6
Select a line shape. In the «Lines» heading, tap one of the line templates. You can choose a line, line arrow, double line arrow, and more.
-
7
Draw your line. Tap and drag across the document to create your line.
- Use two fingers to pinch and zoom out to view the entire document.
- If you need to adjust the line’s length and orientation, tap the left or right circle. Drag it left or right to adjust the length, or drag it up and down to adjust the orientation.
- To move the line, tap and drag it to the desired position.
Advertisement
Add New Question
-
Question
How do I view all available symbols in Microsoft Word?
Click «Insert» and then click «Symbols» and you should be shown a box with all of the symbols in it.
-
Question
How do I add a line on the first page, and no lines on the second?
Click «Insert» and then click «Symbols» and you should be shown a box with all of the symbols in it.
-
Question
How do I change the color of the line?
In the paragraph section, open the drop-down menu on the «Borders» button. At the very bottom is a «Borders and Shading» option. In that option, change the color of the bottom border to your specified color. Click the «Borders» button.
See more answers
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
Advertisement
-
Looking for money-saving deals on Microsoft Office products? Check out our coupon site for tons of coupons and promo codes on your next subscription.
Thanks for submitting a tip for review!
Advertisement
About This Article
Article SummaryX
1. Click Insert.
2. Click Shapes.
3. Select a line template.
4. Click and drag across your Microsoft Word document to draw the line.
Did this summary help you?
Thanks to all authors for creating a page that has been read 2,043,531 times.
Is this article up to date?
Subjects>Electronics>Computers
Wiki User
∙ 9y ago
Best Answer
Copy
B.Sc
Wiki User
∙ 9y ago
This answer is:
Study guides
Add your answer:
Earn +
20
pts
Q: How do you type upper line in MS office?
Write your answer…
Submit
Still have questions?
Related questions
People also asked