A
Alfontz
Thank you in advance for assistance with my issue.
I have some code that enumerates the Sentences collection searching for
specific text. With the following paragraph, the Sentences collection skips
the first half of the stentence.
To reproduce the issue.
Create a new document
Add the following text:
"How many sentences (e.g., ranges) are in this paragraph?"
Create a simple macro:
Sub GetSentences()
Dim r As Range
Dim s As Range
Set r = ActiveDocument.Content
For Each s In r.Sentences
MsgBox s.Text
Next s
End Sub
Notice that the Sentences collection has 2 items?
","
", ranges) are in this paragraph?"
Expected result is only 1 item in the Sentences collection.
Thanks,
Al
I have some code that enumerates the Sentences collection searching for
specific text. With the following paragraph, the Sentences collection skips
the first half of the stentence.
To reproduce the issue.
Create a new document
Add the following text:
"How many sentences (e.g., ranges) are in this paragraph?"
Create a simple macro:
Sub GetSentences()
Dim r As Range
Dim s As Range
Set r = ActiveDocument.Content
For Each s In r.Sentences
MsgBox s.Text
Next s
End Sub
Notice that the Sentences collection has 2 items?
","
", ranges) are in this paragraph?"
Expected result is only 1 item in the Sentences collection.
Thanks,
Al