Sub SpaceEquationsInPara() ' Paul Beverley - Version 08.06.17 ' Adds spaces to MathType equation in this para if necessary okBeforeChars = " (." okAfterChars = " ),!:;." Selection.Expand wdParagraph theEnd = Selection.End myTrack = ActiveDocument.TrackRevisions ActiveDocument.TrackRevisions = False Set rng = Selection.Range.Duplicate rng.Collapse wdCollapseStart With rng.Find .ClearFormatting .Replacement.ClearFormatting .Text = "^1" .Wrap = wdFindStop .Replacement.Text = "" .Forward = True .Execute End With Do While rng.Find.Found = True And rng.Start < theEnd rng.Select Selection.Collapse wdCollapseStart Selection.Move , -1 Selection.MoveEnd , 1 If InStr(okBeforeChars, Selection) = 0 Then Selection.InsertAfter Text:=" " theEnd = theEnd + 1 End If Selection.Find.Execute Selection.Collapse wdCollapseEnd Selection.Move , 2 Selection.MoveStart , -1 If InStr(okAfterChars, Selection) = 0 Then Selection.Collapse wdCollapseStart Selection.TypeText " " Selection.MoveStart , -1 Selection.Range.HighlightColorIndex = wdNoHighlight theEnd = theEnd + 1 End If rng.Collapse wdCollapseEnd ' Selection.Move, 1 'rng.Start = theEnd rng.Find.Execute Loop Selection.Collapse wdCollapseEnd ActiveDocument.TrackRevisions = myTrack End Sub