I thought that might be the case. It probably doesn't matter so much as long as there is at least one full Word (and trailing space) on either side of that undefined shading to capture both values that can then be used by the Find code. This modification excludes undefined and duplicate values
Code:
Sub FindAllShades()
Dim aWord As Range, lPatt As Long, sList As String
For Each aWord In ActiveDocument.Words
If lPatt <> aWord.Font.Shading.BackgroundPatternColor Then
lPatt = aWord.Font.Shading.BackgroundPatternColor
If Not sList Like "*" & lPatt & "*" And lPatt <> 9999999 Then
sList = sList & lPatt & "|"
End If
End If
Next aWord
Debug.Print sList
End Sub
I'm not exactly sure what the OP is trying to do with the 'associate comments/notes' but I would expect that iterating through the comments (as you suggested) would be a more logical thing to do than trying to work through the shading changes.