Sub PunctuationToDash() ' Paul Beverley - Version 25.03.23 ' Changes next hyphen/em/en dash to an em/en dash myDash = ChrW(8212) ' em dash myDash = ChrW(8211) ' en dash trackIt = True searchChars = "-~" & ChrW(8211) & ChrW(8212) & ChrW(8722) & Chr(30) myTrack = ActiveDocument.TrackRevisions If trackIt = False Then ActiveDocument.TrackRevisions = False Set rng = Selection.Range.Duplicate For i = 1 To 1000 rng.MoveEnd , 1 If InStr(searchChars, Right(rng, 1)) > 0 Then rng.Start = rng.End - 1 gotChar = True Exit For End If DoEvents Next i If gotChar = False Then Beep Else rng.Delete rng.Select Selection.TypeText Text:=myDash End If ActiveDocument.TrackRevisions = myTrack End Sub