none
Meeting and NonSendableTo RRS feed

  • Question

  • How do I get the value of NonSendableTo Property? I am new to MAPI and Outlook. Is this a property that I can get in code? I know the ID is 0x8536001F (unicode) and have tried MAPI and Redemption. 

    Thanks


    JoeyP

    Friday, February 24, 2012 11:45 PM

Answers

  • Yes, this is wrong. If you are using MAPIUtils, you need to convert the id/GUID to a property tag (named properties will be different for different stores)

    See http://www.dimastr.com/redemption/utils.htm#xmapi and especially http://www.dimastr.com/redemption/utils.htm#named-props

    PT_UNICODE = 0x001F;

    PR_UnsendableTo = MAPIUtils.Object.GetIdsFromNames("{00062008-0000-0000-C000-000000000046}", 0x8536);

    PR_UnsendableTo = PR_UnsendableTo | PT_UNICODE;

     displayTo = MAPIUtils.Object.HrGetOneProp(tempItem, PR_UnsendableTo);

    If you are using RDO, you can also use the DASL name (GetIDsFromNames will be called internally):

     displayTo = RDOAppointmentItem.Fields["http://schemas.microsoft.com/mapi/id/{00062008-0000-0000-C000-000000000046}/8536001F"];


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



    Saturday, February 25, 2012 3:39 PM

All replies

  • What exactly did not work? What is your code?


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

    Saturday, February 25, 2012 12:02 AM
  • Thanks for the reply! This works 

    object displayTo = MAPIUtils.Object.HrGetOneProp(tempItem, PR_DISPLAY_TO);

    so I tried object displayTo = MAPIUtils.Object.HrGetOneProp(tempItem, 34102);

    I used 34102 as it is the decimal value for 0x8536 (NonSendableTo). I might be doing this wrong as I am new to mapi. 


    JoeyP

    Saturday, February 25, 2012 4:44 AM
  • Yes, this is wrong. If you are using MAPIUtils, you need to convert the id/GUID to a property tag (named properties will be different for different stores)

    See http://www.dimastr.com/redemption/utils.htm#xmapi and especially http://www.dimastr.com/redemption/utils.htm#named-props

    PT_UNICODE = 0x001F;

    PR_UnsendableTo = MAPIUtils.Object.GetIdsFromNames("{00062008-0000-0000-C000-000000000046}", 0x8536);

    PR_UnsendableTo = PR_UnsendableTo | PT_UNICODE;

     displayTo = MAPIUtils.Object.HrGetOneProp(tempItem, PR_UnsendableTo);

    If you are using RDO, you can also use the DASL name (GetIDsFromNames will be called internally):

     displayTo = RDOAppointmentItem.Fields["http://schemas.microsoft.com/mapi/id/{00062008-0000-0000-C000-000000000046}/8536001F"];


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



    Saturday, February 25, 2012 3:39 PM
  • Hi Dmitry -

    Thanks for taking the time to reply. Yes, that worked. Is there any material I can get a hold of that would give me a better understanding of MAPI? I worked with Lotus Notes for 11 years and would like to understand it as well as I understand Notes.

    Thanks again,

    Joey


    JoeyP

    Monday, February 27, 2012 3:40 PM
  • Quick question. You use a GUID ending in 46 where when I look at it in Outlook Spy it ends in 00.

    JoeyP

    Monday, February 27, 2012 3:55 PM
  • You might want to poke around with OutlookSpy and/or MFCMAPI to see what is available and then look things up on MSDN or ask questions in this forum.

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

    Tuesday, February 28, 2012 6:04 AM
  • Are you sure? Can you post a screenshot?

    Are you sure you scrolled to the end of the text in the edit box?


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

    Tuesday, February 28, 2012 6:06 AM
  • Hi JoeyP,
     
    How about the problem on your side? Do you still need any assistant about the problem? If you still show any concern on the problem, just feel free to let us know.
     
    Best Regards,

    Bruce Song [MSFT]
    MSDN Community Support | Feedback to us

    Thursday, March 1, 2012 10:24 AM