View Single Post
 
Old 07-31-2022, 10:35 AM
BrianHoard BrianHoard is offline Windows 10 Office 2019
Advanced Beginner
 
Join Date: Jul 2022
Location: Haymarket, VA USA
Posts: 85
BrianHoard is on a distinguished road
Default How to check for the higest superScript number, that is NOT red?

I'm writing a script that needs to find all superScript numbers in the document, that are NOT red, and get the highest number found.
Here's what I have so far, but I don't know how to process the find to check if the found character is red, or how to retrieve the number it found. I'm thinking I need a loop during the find to check it's font color and text. But I'm stumped how to do that.
Code:
With rng_selection.Find
  .Font.Superscript = True ' Only find superScripts
  .Text = "[0-9]" ' Find only numbers
  .MatchWildcards = True
  .Execute
End With
Thanks for any help.
Reply With Quote