heedaf
10-18-2017, 06:47 PM
I've got the following code:
Sub demo()
Dim rng As Range
Set rng = ActiveDocument.Paragraphs(1).Range
Debug.Print rng.Sentences(1).Text
End Sub
and the following paragraph
Blah blah blah blah test/test blah.
Which will return what is expected ("Blah blah blah blah test/test blah."). And if I change it to
"Blah blah blah blah test/!test blah."
I get "test blah!" which seems to need a space after the ! otherwise it prints what is right of the !. If I change it to:
"Blah blah blah blah test!/test blah."
All I get is "/"
Anyone have any idea what is happening?
Sub demo()
Dim rng As Range
Set rng = ActiveDocument.Paragraphs(1).Range
Debug.Print rng.Sentences(1).Text
End Sub
and the following paragraph
Blah blah blah blah test/test blah.
Which will return what is expected ("Blah blah blah blah test/test blah."). And if I change it to
"Blah blah blah blah test/!test blah."
I get "test blah!" which seems to need a space after the ! otherwise it prints what is right of the !. If I change it to:
"Blah blah blah blah test!/test blah."
All I get is "/"
Anyone have any idea what is happening?