c# - Outlook Add-in,group emails based on color category -


i need set sub folder group property through c# outlook add-in code

basically, got mails in folder different color categories.i need sort them through code

initially thought of sorting:

microsoft.office.interop.outlook.items oitems =m_outlook.inbox.items; oitems.sort("[categories]");

dosnt work... :( pretty lost here

also trying bubble sorting :

but cant assign mail item next index

object objmessage = subfolder.items[counter]; object objnextmessage = subfolder.items[counter + 1];

subfolder.items[counter] = objnextmessage; subfolder.items[counter + 1] = objnextmessage;

error: property or indexer 'microsoft.office.interop.outlook._items.this[object]' cannot assigned -- read


sorting seemed difficult option thought of grouping . how go ?

cheers! rajat

sort re-order items in collection won't update view:

http://msdn.microsoft.com/en-us/library/microsoft.office.interop.outlook._items.sort.aspx

you'd need set collection displayed again after sorting.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -