Sub ExclamationMark() ' Paul Beverley - Version 19.06.19 ' Make adjacent words into sentence end ' newBit = "! " myQuotes = Chr(34) & Chr(39) & ChrW(8220) & ChrW(8216) Selection.Collapse wdCollapseEnd While (LCase(Selection) <> UCase(Selection)) Selection.MoveRight 1 DoEvents Wend myStart = Selection.Start If Selection = ChrW(8217) Then myStart = myStart + 1 Do Selection.MoveRight 1 DoEvents Loop Until LCase(Selection) <> UCase(Selection) Or Asc(Selection) = 1 myEnd = Selection.Start If UCase(Selection) <> Selection Then ' It needs uppercasing Selection.Start = Selection.Start - 1 preChar = Selection Selection.MoveStart 1 Selection.MoveEnd 1 newLetter = UCase(Selection) If InStr(myQuotes, preChar) > 0 Then Selection.Delete Selection.TypeText Text:=newLetter Selection.End = myEnd - 1 Else newBit = newBit & newLetter End If Selection.Start = myStart Else newBit = Trim(newBit) Selection.MoveLeft 1 End If Selection.Start = myStart If Right(Selection, 1) = " " And Len(Selection) > 1 Then Selection.End = Selection.End - 1 newBit = Trim(newBit) End If If Selection.End <> myStart Then Selection.Delete Selection.TypeText Text:=newBit End Sub