Sub DIYFindAshortMacro() ' Paul Beverley - Version 24.11.20 ' Finds a macro shorter than a certain length myLen = 20 Set rng = ActiveDocument.Content myStart = Selection.Start rng.Start = myStart With rng.Find .ClearFormatting .Replacement.ClearFormatting .Text = "^13Sub*\(\)" .Wrap = wdFindStop .Replacement.Text = "" .Forward = True .MatchWildcards = True .Execute End With Do While rng.Find.Found = True rng.MoveEnd Unit:=wdParagraph, count:=myLen If InStr(rng.Text, "End" & " Sub") Then rng.Select Selection.Collapse wdCollapseStart Selection.MoveDown Unit:=wdLine, count:=myLen Selection.MoveUp Unit:=wdLine, count:=myLen myResponse = MsgBox("Fancy this one?", vbQuestion + vbYesNo) If myResponse = vbYes Then Selection.Collapse wdCollapseStart Exit Sub End If End If rng.Collapse wdCollapseEnd rng.Find.Execute DoEvents Loop End Sub