Is there a way to modify the background color in Outlook inbox listing of e-mails (MailItem
instances) programmatically? I'd like to create an add-in that will allow me to color-code my emails according to some rules.
I've went through MailItem properties in the documentation, but wasn't able to find anything display-format related.
The MailItem class doesn't provide anything for that. Instead, you need to customize the view in Outlook.
You can use the CurrentView property of the Folder or Explorer class to get a View object representing the current view. To obtain a View object for the view of the current Explorer, use Explorer.CurrentView instead of the CurrentView property of the current Folder object returned by Explorer.CurrentFolder.
The View object allows you to create customizable views that allow you to better sort, group and ultimately view data of all different types. There are a variety of different view types that provide the flexibility needed to create and maintain your important data.
Views are defined and customized using the View object's XML property. The XML property allows you to create and set a customized XML schema that defines the various features of a view.