You're welcome!
Not that there are some characters you'll want to include that occur at
the end of a sentance or paragraph as valid punctuation. These should
be included in the string passed for IncludeChars...
"!.? "
...where you'll also include any other special characters. You'll need
to modify the loop to include a check that the question character
(which may be a wildcard) is not valid punctuation...
For i = 1 To Len(TextIn)
If Mid$(TextIn, i, 2) = "? " Or _
Mid$(TextIn, i, 3) = "?" & vbCrLf Then
FilterString = FilterString & "~"
Else
If InStr(CharsToKeep, Mid$(TextIn, i, 1)) Then _
FilterString = FilterString & Mid$(TextIn, i, 1)
End If
Next
FilterString = Replace(FilterString, "~", "?")
--
Garry
Free usenet access at
http://www.eternal-september.org
Classic
VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.
vb.general.discussion