![]() |
#2
|
||||
|
||||
![]()
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] |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Distribute text in one cell across a range of cells (overcoming selection.range.cells.count bug) | slaycock | Word VBA | 0 | 02-18-2017 07:00 AM |
![]() |
PRA007 | Word VBA | 2 | 02-19-2016 12:52 AM |
Selection or Range | Tommes93 | Word VBA | 1 | 04-10-2014 02:50 AM |
![]() |
jsb73 | Word VBA | 6 | 08-14-2012 07:35 PM |
Cannot access most of property of MailItem object on Windows Server 2008 64 bit | tz900 | Outlook | 0 | 04-10-2012 12:55 PM |