none
Set a mail's classification for TITUS Add-in RRS feed

  • Question

  • Hi, i'm trying to figure out how to set the classification of a mail automatically but it appears  that it has no effect.

    After displaying the mail, it is clear that it has not been classified.

    Here is my code, i'm skipping the part where the mail object is created but long story short:

                    var app = new Microsoft.Office.Interop.Outlook.Application();
                    var mailitem = app.CreateItem(Microsoft.Office.Interop.Outlook.OlItemType.olMailItem) as Microsoft.Office.Interop.Outlook.MailItem;

    Property set code block:

            public static void SetUserProperty(Microsoft.Office.Interop.Outlook.MailItem Mail)
            {
                Outlook.UserProperties userProperties = null;
                Outlook.UserProperty userProperty = null;
    
                userProperties = Mail.UserProperties;
                userProperty = userProperties.Add("TITUSAutomatedClassification", Outlook.OlUserPropertyType.olText, false, 1);
                userProperty.Value = "Contains Technical Data?=No";
            }

    Just to clarify, mails do not contain any technical data, these are only used as status change notifications.

    Thanks in advance,

    Adrian.

    Tuesday, August 20, 2019 2:33 PM

All replies

  • You are just setting a user property. What do you expect to happen? Did you verify that the property was set (or not) in OutlookSpy (select the message and click the IMessage button)?

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Tuesday, August 20, 2019 2:43 PM
  • I was expecting to see the "No" option selected in the Titus Add-in region of the Mail item after displaying it and before sending it, but its not.

    That's what i mean when i say it had no effect, also i'm not using OutlookSpy and i don't have it.

    Thanks,

    Adrian


    Wednesday, August 21, 2019 5:12 PM
  • If the property is set (you can check it with OutlookSpy - http://www.dimastr.com/outspy), then you really need to take it up with the Titus Adduin developers.

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Wednesday, August 21, 2019 7:05 PM