View Single Post
 
Old 10-24-2019, 06:33 AM
gmaxey gmaxey is offline Windows 10 Office 2016
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,429
gmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the rough
Default

You can also do this using a nested .Find method:

Code:
Sub ScratchMacro()
'A basic Word macro coded by Greg Maxey
Dim oRng As Range, oRngE As Range
  Set oRng = ActiveDocument.Range
  With oRng.Find
    .Text = "Research Refs"
    .Font.Bold = True
    While .Execute
      Set oRngE = oRng.Duplicate
      oRngE.End = ActiveDocument.Range.End
      With oRngE.Find
        .Text = "§"
        .Font.Bold = True
        If .Execute Then
          oRngE.Start = oRng.Start
          oRngE.Delete
        End If
      End With
      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