none
Change Sensitivity Property to OlSensitivity.olNormal RRS feed

  • Question

  • Hi,

    I am trying to change the Outlook MailItem.Sensitivity property of a received mail. The reason for this is that a WebService should create image files from the mails, and the Web service can only work with mail with OlSensitivity.olNormal.
    The problem is that I get the following exception.
    "The object does not support this method."

    Here is the code:
    private bool IsMailSensitivityNormal(Outlook.MailItem mailItem)
            {
                bool changeOk = false;
                if (mailItem.Sensitivity != OlSensitivity.olNormal) // ToDo: Test
                {
                    var dlr = EmmaMassage.Sensivity.Question(mailItem);
                    if (dlr == DialogResult.Yes)
                    {
                        try
                        {
                            mailItem.Sensitivity = OlSensitivity.olNormal; //<-- Here i get the Exception
                            changeOk = true;
                        }
                        catch (Exception ex)
                        {...

    Has anyone an idea how I can solve the problem?

    Thank you
    Sven


    Thursday, March 2, 2017 2:35 PM

All replies

  • Hello Sven,

    Where did you get an instance of the MailItem class? When and where do you call the IsMailSensitivityNormal method in the code?

    Do you develop an Outlook add-in or standalone application?


    profile for Eugene Astafiev at Stack Overflow, Q&A for professional and enthusiast programmers

    Thursday, March 2, 2017 9:09 PM
  • Does this cod actually in a web service (IIS)?

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

    Saturday, March 4, 2017 10:31 PM