View Single Post
 
Old 07-30-2019, 10:32 AM
gmaxey gmaxey is offline Windows 10 Office 2016
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,598
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default

You might try:

Code:
Sub Demo()
Dim oRng As Range
Dim oRngDup As Range
  Set oRng = ActiveDocument.Range
    With oRng.Find
      .ClearFormatting
      .Style = ActiveDocument.Styles("Heading 2")
      Do While .Execute
        Set oRngDup = oRng.Duplicate
        oRngDup.Collapse wdCollapseStart
        oRngDup.MoveEndUntil ".", wdForward
        oRngDup.End = oRngDup.End + 1
        oRngDup.Style = ActiveDocument.Styles("Strong")
        oRng.Collapse wdCollapseEnd
        If oRng.End + 1 = ActiveDocument.Range.End Then Exit Do
      Loop
   End With
End Sub
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote