You can resolve the inconsistency between 'Texte de la sélection' and 'Texte de la plage' by changing:
With Selection
to:
With Selection.Range
The inconsistency between the 'Texte de la sélection' and 'Texte de la plage' on the one hand and the 'Premier Caractère de la sélection' and 'Premier Caractère de la plage' on the other are just a quirk of how VBA works. You can resolve those issues by testing the selection type (or by subtracting the range end from its start) and, if Selection.Type < 2, or the range length is 0, not reporting CharacterEnAsci(.Characters(1)).
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
|