View Single Post
 
Old 05-16-2020, 06:58 AM
gmaxey gmaxey is offline Windows 10 Office 2016
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,617
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default

The find string you are currently using already "finds" paragraph marks. If what you tried to do worked, it would only find the starting keyword if it occurs at the end of a paragraph. Is that what you want?


Code:
Sub ScratchMacro()
  'A basic Word macro coded by Greg Maxey
  With Selection
    .HomeKey Unit:=wdStory
     With Selection.Find
      .ClearFormatting
      .Replacement.ClearFormatting
      .Text = "Start_Word" & Chr(13) & "(*)End_Word"
      .MatchWildcards = True
      .Replacement.Text = ""
      .Execute Replace:=wdReplaceAll
    End With
  End With
lbl_Exit:
  Exit Sub
End Sub
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote