View Single Post
 
Old 05-19-2020, 09:02 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

Mr Bill,


This is a freebie, but this also isn't a code writing service and you should make some attempt before asking for the solution on a platter.

Code:
Sub ScratchMacro()
'A basic Word macro coded by Greg Maxey
Dim oRng As Range
  Set oRng = ActiveDocument.Range
  With oRng.Find
    .Text = "Chapter [0-9]@"
    .MatchWildcards = True
     While .Execute
      oRng.Move wdParagraph, 2
      oRng.Paragraphs(1).Style = "Normal" 'You should create some named style for your first paragraphs and replace "Normal" with it.
      oRng.Collapse wdCollapseEnd
    Wend
  End With
lbl_Exit:
  Exit Sub
End Sub
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote