Sub SpacelessMMS()
Application.Selection.Find.Forward = True
Call layout_tools.track_changes_and_show_final
Call layout_search_replace.jump_to_reference_section
With Selection.Find
.ClearFormatting
.Text = "(\, [A-Z]\.) ([A-Z]\.)"
.MatchWildcards = True
.Wrap = wdFindStop
.Forward = True
.Replacement.Text = "\1\2"
Do
.Execute
If Not .Found Then
Exit Do
End If
If .Found Then
Selection.MoveRight wdCharacter, 3, wdExtend
Do
If FunctionGroup.lenSelect(Selection.Text) = Len(Selection.Text) Then
Selection.MoveRight wdCharacter, 3, wdExtend
Else
Selection.MoveLeft wdCharacter, 3, wdExtend
Selection.Text = Replace(Selection.Text, ". ", ".")
Selection.MoveRight wdCharacter, 1
Exit Do
End If
Loop
End If
Loop
End With
ActiveWindow.View.ShowRevisionsAndComments = True
End Sub