title: Get named MAPI Property from MailItem in C#
body: <p>I'm developing an Outlook 2010 custom plugin in C#. This is my first time using C# (I'm a java guy normally).</p>
  
  <p>There is a named (custom) MAPI property on a message that I would like to access and am having trouble doing so. My understanding is that in Outlook 2007 the PropertyAccessor object was introduced which allows easy access to named MAPI properties. I followed the instructions from the following documentation:</p>
  
  <p><a href="http://msdn.microsoft.com/en-us/library/ff868915.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/ff868915.aspx</a></p>
  
  <p>I can see the named MAPI property I want to access on the message using Outlook Spy. From Outlook Spy I can get the following information about the property:</p>
  
  <pre><code>GUID:    {00020329-0000-0000-C000-000000000046}
  Tag num: 0x80BE0102
  ID:      PR.AFU.MESSAGE.RETRIEVE.INFO
  Type:    PT_BINARY
  </code></pre>
  
  <p>So I tried the following code (Object mail is a valid instance of MailItem):</p>
  
  <pre><code>mail.PropertyAccessor.GetProperty("http://schemas.microsoft.com/mapi/id/{00020329-0000-0000-C000-000000000046}/80BE0102");
  </code></pre>
  
  <p>This produces the following exception:</p>
  
  <pre><code>The property "http://schemas.microsoft.com/mapi/id/{00020329-0000-0000-C000-000000000046}/80BE0102" is unknown or cannot be found
  </code></pre>
  
  <p>So I'm wondering how to actually get this property? Am I forming the namespace reference incorrectly? Or do I need to use an approach as outlined in this example:</p>
  
  <p><a href="http://www.outlookcode.com/codedetail.aspx?id=1112" rel="nofollow">http://www.outlookcode.com/codedetail.aspx?id=1112</a></p>
  
  <p>My understanding was that this was only necessary for pre 2007 versions of Outlook. Any help is much appreciated!</p>