Thank you for this. For some reason it's not working for me.
I have a category already labelled 'TRIM'
In VB, I have VbaProject.OTM - ThisOutlookSession with your code
In the Home ribbon, I added a new group and then added your Macro (CategoryButton.ThisOutlookSession.Add_Category) and renamed it.
In the email, I clicked on the new button and it doesn't apply the category.
I must have missed a step somewhere, can you help?
Thank you
Mel