View Single Post
 
Old 05-04-2023, 07:30 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

The code in your attached document hasn't got a mention of "Str" so the result will be the Case Else is the line making changes. In that line you set the background color but don't touch the font color so if it was white before you got there it is now white font on a white background.

If you want Str to be treated the same as Strong, include it in the Case condition like I did

If you want Case Else to set the background AND the font then change that line to
Code:
Case Else: .Range.Cells(1).Shading.BackgroundPatternColorIndex = wdNoHighlight: .Range.Cells(1).Range.Font.ColorIndex = wdBlack
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote