How about
:
Code:
Sub GetMaxSpaces()
Dim StrTxt As String, StrTmp As String, i As Long
StrTxt = ActiveDocument.Range.Text: StrTmp = " "
While InStr(StrTxt, StrTmp) > 0
StrTmp = StrTmp & " "
i = i + 1
Wend
MsgBox "The maximum space sequence is: " & i
End Sub