none
outlook 2010 mark email as private and confidential code RRS feed

  • Question

  • Hi all

    I have the code bellow which ask the user if the email is Private before sending, the issue is that it keeps getting disabled and the only way to enable it is to take the code out and read it again. Does anyone know of better way of controlling this without it getting disabled, I have no idea why it keeps getting disabled.

    I have checked all the add-ins in outlook 2010 including macro options, appreciate any advice or if anyone has better way of doing it.

    Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
    If MsgBox("Is this item private?", vbYesNo, "Set email sensitivity") = vbYes Then
        Item.Sensitivity = olPrivate
    Else
    'do nothing
    End If
    End Sub


    roufghrier

    Monday, April 29, 2013 9:13 AM

All replies

  • you are not checking if passed in object actually contains property Sensitivity.
    Monday, April 29, 2013 1:33 PM
  • Hi Damian,

    Unfortunately I’m not a programmer and I have inherited this code from a previous user who was, any ideas on how I could change it to do so and will  what your suggesting would fix this it from getting disabled.

    Thanks


    roufghrier

    Monday, April 29, 2013 2:27 PM
  • just to be sure - this is vb.net add-in?
    Monday, April 29, 2013 6:43 PM
  • no just added the vba code to outlook back end in a Module, no .net application


    roufghrier

    Tuesday, May 7, 2013 1:18 PM
  • Hi roufghrier, did you ever get this working? I have a similar issue. Thanks
    Thursday, January 9, 2014 3:59 PM