Do you mean an Em dash? That has a character code of 151
If Not .Characters.Last.Previous Like "[.!?:;" & Chr(151) & "]" Then
Printable View
Do you mean an Em dash? That has a character code of 151
If Not .Characters.Last.Previous Like "[.!?:;" & Chr(151) & "]" Then
Yes, em dash. Wasn't too sure about concatenating in that circumstance, so that helps too.
You would need to test for any of:
Hyphen - ASCII 45
En-dash - ASCII 150
Em-dash - ASCII 151
Minus sign - ASCII 173
all of which can be inserted explicitly into the string without the need for Chr or ChrW
Fab, thanks. All these numbers can get confusing! ANSI, hex, Unicode ...