Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • Hi, I just tried doing this, however the category doesn't update. It runs the instruction mailItem.Categories = customCat; with no problems, but it doesn't show in Outlook. Should I save or something? Commented Oct 1, 2012 at 15:40
  • 5
    You need to issue a MailItem.Save() to persist any metadata changes with MailItems Commented Oct 1, 2012 at 16:16
  • 5
    FYI according to this: msdn.microsoft.com/en-us/library/office/… the delimiter is localized (which is a dumb idea) This property uses the character specified in the value name, sList, under HKEY_CURRENT_USER\Control Panel\International in the Windows registry, as the delimiter for multiple categories. Commented May 28, 2014 at 18:29
  • 1
    Note you can ensure you are using the current culture "List dilimiter" with mailItem.Categories = $"{customCat}{System.Globalization.CultureInfo.CurrentCulture.TextInfo.ListSeparator} {mailItem.Categories}"; Commented Sep 1, 2017 at 1:46