Sub FindHashAndStyleNext() ' Paul Beverley - Version 19.01.23 ' Finds a hash and changes the style of the following paragraph myStyle = "Heading 1" Set rng = ActiveDocument.Content With rng.Find .ClearFormatting .Replacement.ClearFormatting .Text = "#" .Wrap = wdFindStop .Replacement.Text = "" .Forward = True .MatchWildcards = False .MatchWholeWord = False .Execute End With myCount = 0 Do While rng.Find.Found = True myCount = myCount + 1 rng.Expand wdParagraph rng.Collapse wdCollapseEnd rng.Expand wdParagraph If myCount Mod 20 = 0 Then rng.Select rng.Style = myStyle rng.Collapse wdCollapseEnd rng.Find.Execute DoEvents Loop MsgBox "Changed: " & myCount End Sub