Get the number of custom (spot) colors.
getNumCustomColors([out, retval] int *n)
The getNumCustomColors and getCustomColorName functions provide access to the list of custom colors (a.k.a. spot colors) used on the pages specified in the last call to analyzePages.

The getNumCustomColorObjects function will return the number of objects drawn in a specified custom color.

' analyze page 1 pdf.analyzePages 1, 1 n = pdf.getNumCustomColors For i = 0 To n-1 name = pdf.getCustomColorName(i) count = pdf.getNumCustomColorObjects(i) MsgBox count & " objects drawn in the " & name & " custom color" Next i