Hello
When I type two words in the end of a line, then the two words may be apart to different lines in Word document as there is no enough space. One locates in the end of a line, another locates in the start of next line.
But for some special words, I don't want to break them into two lines. I hope they can always stay in the same line. How can I do this in Word 2010?
-- merged --
For that, there many ways to do that.
Method 1: Use Non-breaking Space
Just select the space between the two words which you want to stick them together, press “Ctrl+ Shift+ Space bar”.
Method 2: Use “Replace” Feature
1. To start with, select all target words.
2. Then click “Replace” in “Editing” group under “Home” tab. Or press “Ctrl+ H” instead.
3. Ensure the “Replace” tab is on. Enter one space in “Find what” text box.
4. And input “^s” in “Replace with” text box.
5. Lastly, click “Replace All”.
6. Click “No” to stop performing replacement on the whole document.
Method 3: Run Macro
Sub ReplaceSpaceWithNonBreakingSpace()
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = " "
.Replacement.text = "^s"
.Forward = True
.Wrap = wdFindStop
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
More details see at
Code:
https://www.datanumen.com/blogs/3-ways-prevent-closely-related-words-breaking-across-two-lines-word-document
Hope it will help.