View Single Post
 
Old 03-27-2023, 12:16 AM
Dimsok Dimsok is offline Windows XP Office 2007
Advanced Beginner
 
Join Date: Sep 2014
Location: exUSSR
Posts: 50
Dimsok is on a distinguished road
Default Every word from new line

I would like to have a code, which makes all word from new line (paragraph). Any other method, except just replacing:
Code:
Sub Wordsfromnewline()
 With Selection.Find
 .Text = " "
 .Replacement.Text = "^p"
 .Forward = True
 .Wrap = wdFindContinue
 .Format = False
 .MatchCase = False
 .MatchWholeWord = False
 .MatchByte = False
 .MatchWildcards = False
 .MatchSoundsLike = False
 .MatchAllWordForms = False
 End With
 Selection.Find.Execute Replace:=wdReplaceAll
  Exit Sub
End Sub
Reply With Quote