Assigning a colur via categories to a mailitem

Add-in Express™ Support Service
That's what is more important than anything else

Assigning a colur via categories to a mailitem
 
Sujay Ghosh




Posts: 27
Joined: 2010-01-20
Hi

I want to assign a text and colour to mail items based on a condition.

However I am seeing that only text can be assigned via https://docs.microsoft.com/en-us/office/vba/api/outlook.mailitem.categories

How do I assign both .

Thanks
Sujay
Posted 11 Jul, 2022 23:48:57 Top
Andrei Smolin


Add-in Express team


Posts: 18825
Joined: 2006-05-11
Hello Sujay,

Yes, the Categories property only accept text values. As to the color, how do you expect this to look like?

Regards from Poland (CEST),

Andrei Smolin
Add-in Express Team Leader
Posted 12 Jul, 2022 03:28:59 Top
Sujay Ghosh




Posts: 27
Joined: 2010-01-20
Hello Andrei

I want to replace the colour added to the text ; presently it has black colour tag, can this be changed .( MailItem_Category.png )

Also how is it possible to categorize the mailitem with a colour ; I found a https://stackoverflow.com/questions/50902773/how-to-get-or-assign-a-color-category-to-a-mailitem, but cant understand how to associate it with the mailitem . ( Category.png )


I have added the pictures in the https://wsi.li/dl/CaHn6YB2KrRpze8Sw/

Thanks
Sujay
Posted 13 Jul, 2022 00:16:57 Top
Andrei Smolin


Add-in Express team


Posts: 18825
Joined: 2006-05-11
Hello Sujay,

Thank you for the explanation.

You get the name of the category with a correct color and assign it to MailItem.Categories.

Regards from Poland (CEST),

Andrei Smolin
Add-in Express Team Leader
Posted 13 Jul, 2022 04:25:28 Top