Jan 13 2023 10:59 AM
Jan 13 2023 10:59 AM
I am trying to highlight the blank spaces so every line of text and the rest of the page can be underlined. The regular underline function only underlines the words highlighted. Is there anyway to highlight the entire page so when I use the underline function the entire page gets underlined?
Jan 13 2023 11:19 AM - edited Jan 13 2023 11:22 AM
I can think of no way to simply do this.
You can put a bottom border on a paragraph and make each line a separate paragraph. This really makes a document hard to edit though.
You can put an image or a table positioned behind text that has the lines.
Here is an attempt at it. It uses a Table in a Textbox that is positioned behind text.
You would want exact line spacing for this to work.
Jan 13 2023 11:53 AM
Jan 13 2023 01:58 PM - edited Jan 13 2023 08:56 PM
Word is not built to do this. Period. Here is as close as I can come to what you want.
Here is a screenshot showing formatting characters. I have circled the tabs.
If you need to have the first line of a paragraph indented, you need to do it with a Tab rather than a first-line paragraph indent and must have another tab setting to catch the first tab.
Unless your typing is strange, this is going to change your text layout.
Here is a macro that does this to selected text.
Sub UnderlineAllToMargins() ' ' Charles Kenyon 2023-01-13 ' https://techcommunity.microsoft.com/t5/word/formatting-on-word/m-p/3715875 ' With Selection ' Underline text (character formatting) .Font.Underline = wdUnderlineSingle ' With .ParagraphFormat ' Align for full justification .Alignment = wdAlignParagraphJustify ' ' Add Right Tab Stop .TabStops.Add Position:=InchesToPoints(6.5), _ Alignment:=wdAlignTabRight, Leader:=wdTabLeaderSpaces ' ' adjust to single space .LeftIndent = InchesToPoints(0) .RightIndent = InchesToPoints(0) .SpaceBefore = 0 .SpaceBeforeAuto = False .SpaceAfter = 0 .SpaceAfterAuto = False .LineSpacingRule = wdLineSpaceSingle .LineUnitBefore = 0 .LineUnitAfter = 0 End With ' ' Tab at end of each paragraph With .Find .ClearFormatting .Replacement.ClearFormatting .Text = "^p" .Replacement.Text = "^t^p" .Forward = True .Wrap = wdFindStop .Format = False .MatchCase = False .MatchWholeWord = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False .Execute Replace:=wdReplaceAll .ClearFormatting .Replacement.ClearFormatting .Text = "" .Replacement.Text = "" End With End With End Sub
If any of the text has a paragraph indent, the underlining will start at the indent. Likewise, if there is a right indent inside the margin, it will stop there.
The macro single spaces the text and removes any spacing between paragraphs. The lines that do this are indicated and can be removed or commented out if you want something different.
Here is what to do with macros:
You can assign a keyboard shortcut to this macro and/or put it on your QAT.