View Single Post
 
Old 08-06-2020, 09:30 PM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,978
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

Just going on the highlighting part, the code is very simple
Code:
Sub HilitePartNums()
  Dim rngWord As Range, aRng As Range, sWord As String
  For Each rngWord In ActiveDocument.Words
    sWord = UCase(Trim(rngWord.Text))
    If sWord Like "*[0-9]*" Then
      If sWord Like "*[A-Z]*" Then
        rngWord.HighlightColorIndex = wdYellow
        Debug.Print sWord
      End If
    End If
  Next rngWord
End Sub
This will highlight the instances and add a compiled list in your Immediate window. I think there is a limit of how many lines can sit in the Immediate window so you will not see the early ones if you have over 255? hits.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote