![]() |
|
#1
|
|||
|
|||
|
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
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
split word document based on bookmarks with each new document title of the bookmark
|
megatronixs | Word VBA | 9 | 09-05-2020 02:29 PM |
Can pass .expression as a parameter?
|
tinfanide | PowerPoint | 4 | 12-28-2012 06:14 PM |
| How to pass parameters to a .msg file? | HereNow | Outlook | 0 | 11-05-2012 10:38 AM |
| Office 2010 Excel Full pass | raineraus | Excel | 1 | 09-19-2012 12:55 PM |
Anchoring a section break to the bottom of a page, and having a table pass over it???
|
h3rk | Word Tables | 1 | 11-20-2009 07:34 AM |