Hi, if I correctly understand your objective, try this (move quotes to be just before the punctuations):
For Each myChr In myRng.Characters
If myChr Like "[,;.:?]" _
And myChr.Next Like "[«‹›»" & Chr(39) & Chr(34) & Chr(146) & Chr(148) & "]" Then
myChr.InsertBefore myChr.Next
myChr.Next.Delete
End If
Note that the code is quite slow because it checks each char in the range.
|