View Single Post
 
Old 11-24-2022, 02:52 PM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,176
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

That 'blue' you are showing is referred to as Turquoise by Microsoft (or cyan by me) so you would need to change the blue case in the code to
Code:
Case wdTurquoise
          aRng.InsertBefore "[Color: Blue]".
The point of the Case Else is so that when highlight colours were not explicitly named above you had a way of catching those instances. When there are contiguous blocks of different highlight colours they will be handled by the Case Else statement. You would need to add code in that case to step through each character in the found range and test the highlights. I haven't got time for that right now but if no one gets back to you I can have a look at it in a few days.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote