I am not the most versed in VBA so needed some help. I have this function but I am not sure how to pass the current document as the input.
Here is the beggining of the procedure, please advise how i reference the current document as the "Sentences" to use as the input to this function..
Code:
Function GetSentences(ByVal Sentences As String) As Collection
'Delete space
Sentences = Trim(Sentences)
Dim sList As New Collection
Dim RE As Object, REMatches As Object
Set RE = CreateObject("vbscript.regexp")
With RE
.MultiLine = False
.Global = True
.IgnoreCase = False
.Pattern = "(\S.+?[.?])(?=\s+|$)\s"
End With
....
End Function