Sorting Outlook messages based on category

Hi,
I am looping through a list of Outlook mails.
I want to only read the mails that has no category assigned.
Is there any one who knows how can I do that? Is the only way to use recording?

@Rugholm,

No category assigned in the sense ?

In Outlook it’s possible to assign a category to a mail (the category also has a color).

Is there a solution for this already?