Hello
As I post for Excel, I have done the code suitable for Excel. It may be suitable for Word, but I have not tried it as such
Sub test()
Dim maxwords As Integer
Dim sentence As Variant
Dim phrase As Variant
Dim nextpiece As Variant
Dim wordcount As Integer
stop1 = "."
stop2 = ","
sentence = ActiveCell.Value
For n = 1 To Len(sentence)
nextpiece = Mid(sentence, n, 1)
phrase = phrase & nextpiece
If nextpiece = " " Then
If Len(phrase) > 1 Then wordcount = wordcount + 1 'check needed to catch space after stops
Else
'do nothing
End If
If (nextpiece = stop1 Or nextpiece = stop2 Or wordcount = 5) Then
ActiveCell.Offset(1, 0).Value = phrase
ActiveCell.Offset(1, 0).Activate
phrase = ""
wordcount = 0
End If
Next n
End Sub
Regards
Bookmarks